< prev index next >

src/share/vm/code/nmethod.cpp

Print this page
rev 9257 : imported patch 8141134-remove-unncessary-pragmas


 663           }
 664           // record this nmethod as dependent on this klass
 665           InstanceKlass::cast(klass)->add_dependent_nmethod(nm);
 666         }
 667       }
 668       NOT_PRODUCT(if (nm != NULL)  note_java_nmethod(nm));
 669       if (PrintAssembly || CompilerOracle::has_option_string(method, "PrintAssembly")) {
 670         Disassembler::decode(nm);
 671       }
 672     }
 673   }
 674   // Do verification and logging outside CodeCache_lock.
 675   if (nm != NULL) {
 676     // Safepoints in nmethod::verify aren't allowed because nm hasn't been installed yet.
 677     DEBUG_ONLY(nm->verify();)
 678     nm->log_new_nmethod();
 679   }
 680   return nm;
 681 }
 682 
 683 #ifdef _MSC_VER
 684 #pragma warning(push)
 685 #pragma warning(disable:4355) //  warning C4355: 'this' : used in base member initializer list
 686 #endif
 687 // For native wrappers
 688 nmethod::nmethod(
 689   Method* method,
 690   int nmethod_size,
 691   int compile_id,
 692   CodeOffsets* offsets,
 693   CodeBuffer* code_buffer,
 694   int frame_size,
 695   ByteSize basic_lock_owner_sp_offset,
 696   ByteSize basic_lock_sp_offset,
 697   OopMapSet* oop_maps )
 698   : CodeBlob("native nmethod", code_buffer, sizeof(nmethod),
 699              nmethod_size, offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps),
 700   _native_receiver_sp_offset(basic_lock_owner_sp_offset),
 701   _native_basic_lock_sp_offset(basic_lock_sp_offset)
 702 {
 703   {
 704     debug_only(No_Safepoint_Verifier nsv;)
 705     assert_locked_or_safepoint(CodeCache_lock);
 706 


 755       xtty->stamp();
 756       xtty->end_head(" address='" INTPTR_FORMAT "'", (intptr_t) this);
 757     }
 758     // print the header part first
 759     print();
 760     // then print the requested information
 761     if (PrintNativeNMethods) {
 762       print_code();
 763       if (oop_maps != NULL) {
 764         oop_maps->print();
 765       }
 766     }
 767     if (PrintRelocations) {
 768       print_relocations();
 769     }
 770     if (xtty != NULL) {
 771       xtty->tail("print_native_nmethod");
 772     }
 773   }
 774 }
 775 
 776 #ifdef _MSC_VER
 777 #pragma warning(pop)
 778 #endif
 779 
 780 void* nmethod::operator new(size_t size, int nmethod_size, int comp_level) throw () {
 781   return CodeCache::allocate(nmethod_size, CodeCache::get_code_blob_type(comp_level));
 782 }
 783 
 784 nmethod::nmethod(
 785   Method* method,
 786   int nmethod_size,
 787   int compile_id,
 788   int entry_bci,
 789   CodeOffsets* offsets,
 790   int orig_pc_offset,
 791   DebugInformationRecorder* debug_info,
 792   Dependencies* dependencies,
 793   CodeBuffer *code_buffer,
 794   int frame_size,
 795   OopMapSet* oop_maps,
 796   ExceptionHandlerTable* handler_table,
 797   ImplicitExceptionTable* nul_chk_table,
 798   AbstractCompiler* compiler,




 663           }
 664           // record this nmethod as dependent on this klass
 665           InstanceKlass::cast(klass)->add_dependent_nmethod(nm);
 666         }
 667       }
 668       NOT_PRODUCT(if (nm != NULL)  note_java_nmethod(nm));
 669       if (PrintAssembly || CompilerOracle::has_option_string(method, "PrintAssembly")) {
 670         Disassembler::decode(nm);
 671       }
 672     }
 673   }
 674   // Do verification and logging outside CodeCache_lock.
 675   if (nm != NULL) {
 676     // Safepoints in nmethod::verify aren't allowed because nm hasn't been installed yet.
 677     DEBUG_ONLY(nm->verify();)
 678     nm->log_new_nmethod();
 679   }
 680   return nm;
 681 }
 682 




 683 // For native wrappers
 684 nmethod::nmethod(
 685   Method* method,
 686   int nmethod_size,
 687   int compile_id,
 688   CodeOffsets* offsets,
 689   CodeBuffer* code_buffer,
 690   int frame_size,
 691   ByteSize basic_lock_owner_sp_offset,
 692   ByteSize basic_lock_sp_offset,
 693   OopMapSet* oop_maps )
 694   : CodeBlob("native nmethod", code_buffer, sizeof(nmethod),
 695              nmethod_size, offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps),
 696   _native_receiver_sp_offset(basic_lock_owner_sp_offset),
 697   _native_basic_lock_sp_offset(basic_lock_sp_offset)
 698 {
 699   {
 700     debug_only(No_Safepoint_Verifier nsv;)
 701     assert_locked_or_safepoint(CodeCache_lock);
 702 


 751       xtty->stamp();
 752       xtty->end_head(" address='" INTPTR_FORMAT "'", (intptr_t) this);
 753     }
 754     // print the header part first
 755     print();
 756     // then print the requested information
 757     if (PrintNativeNMethods) {
 758       print_code();
 759       if (oop_maps != NULL) {
 760         oop_maps->print();
 761       }
 762     }
 763     if (PrintRelocations) {
 764       print_relocations();
 765     }
 766     if (xtty != NULL) {
 767       xtty->tail("print_native_nmethod");
 768     }
 769   }
 770 }




 771 
 772 void* nmethod::operator new(size_t size, int nmethod_size, int comp_level) throw () {
 773   return CodeCache::allocate(nmethod_size, CodeCache::get_code_blob_type(comp_level));
 774 }
 775 
 776 nmethod::nmethod(
 777   Method* method,
 778   int nmethod_size,
 779   int compile_id,
 780   int entry_bci,
 781   CodeOffsets* offsets,
 782   int orig_pc_offset,
 783   DebugInformationRecorder* debug_info,
 784   Dependencies* dependencies,
 785   CodeBuffer *code_buffer,
 786   int frame_size,
 787   OopMapSet* oop_maps,
 788   ExceptionHandlerTable* handler_table,
 789   ImplicitExceptionTable* nul_chk_table,
 790   AbstractCompiler* compiler,


< prev index next >