comparison src/share/vm/code/nmethod.hpp @ 1748:3e8fbc61cee8

6978355: renaming for 6961697 Summary: This is the renaming part of 6961697 to keep the actual changes small for review. Reviewed-by: kvn, never
author twisti
date Wed, 25 Aug 2010 05:27:54 -0700
parents 71faaa8e3ccc
children 0878d7bae69f
comparison
equal deleted inserted replaced
1747:53dbe853fb3a 1748:3e8fbc61cee8
310 int trap_offset, 310 int trap_offset,
311 int frame_complete, 311 int frame_complete,
312 int frame_size); 312 int frame_size);
313 313
314 int trap_offset() const { return _trap_offset; } 314 int trap_offset() const { return _trap_offset; }
315 address trap_address() const { return code_begin() + _trap_offset; } 315 address trap_address() const { return insts_begin() + _trap_offset; }
316 316
317 #endif // def HAVE_DTRACE_H 317 #endif // def HAVE_DTRACE_H
318 318
319 // accessors 319 // accessors
320 methodOop method() const { return _method; } 320 methodOop method() const { return _method; }
334 bool is_compiled_by_c1() const; 334 bool is_compiled_by_c1() const;
335 bool is_compiled_by_c2() const; 335 bool is_compiled_by_c2() const;
336 bool is_compiled_by_shark() const; 336 bool is_compiled_by_shark() const;
337 337
338 // boundaries for different parts 338 // boundaries for different parts
339 address code_begin () const { return _entry_point; } 339 address insts_begin () const { return code_begin(); }
340 address code_end () const { return header_begin() + _stub_offset ; } 340 address insts_end () const { return header_begin() + _stub_offset ; }
341 address exception_begin () const { return header_begin() + _exception_offset ; } 341 address exception_begin () const { return header_begin() + _exception_offset ; }
342 address deopt_handler_begin () const { return header_begin() + _deoptimize_offset ; } 342 address deopt_handler_begin () const { return header_begin() + _deoptimize_offset ; }
343 address deopt_mh_handler_begin() const { return header_begin() + _deoptimize_mh_offset ; } 343 address deopt_mh_handler_begin() const { return header_begin() + _deoptimize_mh_offset ; }
344 address unwind_handler_begin () const { return _unwind_handler_offset != -1 ? (header_begin() + _unwind_handler_offset) : NULL; } 344 address unwind_handler_begin () const { return _unwind_handler_offset != -1 ? (header_begin() + _unwind_handler_offset) : NULL; }
345 address stub_begin () const { return header_begin() + _stub_offset ; } 345 address stub_begin () const { return header_begin() + _stub_offset ; }
359 address handler_table_end () const { return header_begin() + _nul_chk_table_offset ; } 359 address handler_table_end () const { return header_begin() + _nul_chk_table_offset ; }
360 address nul_chk_table_begin () const { return header_begin() + _nul_chk_table_offset ; } 360 address nul_chk_table_begin () const { return header_begin() + _nul_chk_table_offset ; }
361 address nul_chk_table_end () const { return header_begin() + _nmethod_end_offset ; } 361 address nul_chk_table_end () const { return header_begin() + _nmethod_end_offset ; }
362 362
363 // Sizes 363 // Sizes
364 int code_size () const { return code_end () - code_begin (); } 364 int insts_size () const { return insts_end () - insts_begin (); }
365 int stub_size () const { return stub_end () - stub_begin (); } 365 int stub_size () const { return stub_end () - stub_begin (); }
366 int consts_size () const { return consts_end () - consts_begin (); } 366 int consts_size () const { return consts_end () - consts_begin (); }
367 int oops_size () const { return (address) oops_end () - (address) oops_begin (); } 367 int oops_size () const { return (address) oops_end () - (address) oops_begin (); }
368 int scopes_data_size () const { return scopes_data_end () - scopes_data_begin (); } 368 int scopes_data_size () const { return scopes_data_end () - scopes_data_begin (); }
369 int scopes_pcs_size () const { return (intptr_t) scopes_pcs_end () - (intptr_t) scopes_pcs_begin (); } 369 int scopes_pcs_size () const { return (intptr_t) scopes_pcs_end () - (intptr_t) scopes_pcs_begin (); }
372 int nul_chk_table_size() const { return nul_chk_table_end() - nul_chk_table_begin(); } 372 int nul_chk_table_size() const { return nul_chk_table_end() - nul_chk_table_begin(); }
373 373
374 int total_size () const; 374 int total_size () const;
375 375
376 // Containment 376 // Containment
377 bool code_contains (address addr) const { return code_begin () <= addr && addr < code_end (); } 377 bool insts_contains (address addr) const { return insts_begin () <= addr && addr < insts_end (); }
378 bool stub_contains (address addr) const { return stub_begin () <= addr && addr < stub_end (); } 378 bool stub_contains (address addr) const { return stub_begin () <= addr && addr < stub_end (); }
379 bool consts_contains (address addr) const { return consts_begin () <= addr && addr < consts_end (); } 379 bool consts_contains (address addr) const { return consts_begin () <= addr && addr < consts_end (); }
380 bool oops_contains (oop* addr) const { return oops_begin () <= addr && addr < oops_end (); } 380 bool oops_contains (oop* addr) const { return oops_begin () <= addr && addr < oops_end (); }
381 bool scopes_data_contains (address addr) const { return scopes_data_begin () <= addr && addr < scopes_data_end (); } 381 bool scopes_data_contains (address addr) const { return scopes_data_begin () <= addr && addr < scopes_data_end (); }
382 bool scopes_pcs_contains (PcDesc* addr) const { return scopes_pcs_begin () <= addr && addr < scopes_pcs_end (); } 382 bool scopes_pcs_contains (PcDesc* addr) const { return scopes_pcs_begin () <= addr && addr < scopes_pcs_end (); }
504 504
505 // Inline cache support 505 // Inline cache support
506 void clear_inline_caches(); 506 void clear_inline_caches();
507 void cleanup_inline_caches(); 507 void cleanup_inline_caches();
508 bool inlinecache_check_contains(address addr) const { 508 bool inlinecache_check_contains(address addr) const {
509 return (addr >= instructions_begin() && addr < verified_entry_point()); 509 return (addr >= code_begin() && addr < verified_entry_point());
510 } 510 }
511 511
512 // unlink and deallocate this nmethod 512 // unlink and deallocate this nmethod
513 // Only NMethodSweeper class is expected to use this. NMethodSweeper is not 513 // Only NMethodSweeper class is expected to use this. NMethodSweeper is not
514 // expected to use any other private methods/data in this class. 514 // expected to use any other private methods/data in this class.
557 557
558 PcDesc* find_pc_desc_internal(address pc, bool approximate); 558 PcDesc* find_pc_desc_internal(address pc, bool approximate);
559 559
560 PcDesc* find_pc_desc(address pc, bool approximate) { 560 PcDesc* find_pc_desc(address pc, bool approximate) {
561 PcDesc* desc = _pc_desc_cache.last_pc_desc(); 561 PcDesc* desc = _pc_desc_cache.last_pc_desc();
562 if (desc != NULL && desc->pc_offset() == pc - instructions_begin()) { 562 if (desc != NULL && desc->pc_offset() == pc - code_begin()) {
563 return desc; 563 return desc;
564 } 564 }
565 return find_pc_desc_internal(pc, approximate); 565 return find_pc_desc_internal(pc, approximate);
566 } 566 }
567 567