< prev index next >

src/share/vm/code/nmethod.cpp

Print this page
rev 13280 : imported patch CollectedHeap_register_nmethod

*** 408,422 **** #endif _oops_do_mark_link = NULL; _jmethod_id = NULL; _osr_link = NULL; - if (UseG1GC) { _unloading_next = NULL; - } else { _scavenge_root_link = NULL; - } _scavenge_root_state = 0; #if INCLUDE_RTM_OPT _rtm_state = NoRTM; #endif #if INCLUDE_JVMCI --- 408,419 ----
*** 596,611 **** _deopt_mh_handler_begin = (address) this + deoptimize_mh_offset; code_buffer->copy_code_and_locs_to(this); code_buffer->copy_values_to(this); if (ScavengeRootsInCode) { - if (detect_scavenge_root_oops()) { - CodeCache::add_scavenge_root_nmethod(this); - } Universe::heap()->register_nmethod(this); } ! debug_only(verify_scavenge_root_oops()); CodeCache::commit(this); } if (PrintNativeNMethods || PrintDebugInfo || PrintRelocations || PrintDependencies) { ttyLocker ttyl; // keep the following output all in one block --- 593,605 ---- _deopt_mh_handler_begin = (address) this + deoptimize_mh_offset; code_buffer->copy_code_and_locs_to(this); code_buffer->copy_values_to(this); if (ScavengeRootsInCode) { Universe::heap()->register_nmethod(this); } ! debug_only(Universe::heap()->verify_nmethod_roots(this)); CodeCache::commit(this); } if (PrintNativeNMethods || PrintDebugInfo || PrintRelocations || PrintDependencies) { ttyLocker ttyl; // keep the following output all in one block
*** 751,766 **** // Copy contents of ScopeDescRecorder to nmethod code_buffer->copy_values_to(this); debug_info->copy_to(this); dependencies->copy_to(this); if (ScavengeRootsInCode) { - if (detect_scavenge_root_oops()) { - CodeCache::add_scavenge_root_nmethod(this); - } Universe::heap()->register_nmethod(this); } ! debug_only(verify_scavenge_root_oops()); CodeCache::commit(this); // Copy contents of ExceptionHandlerTable to nmethod handler_table->copy_to(this); --- 745,757 ---- // Copy contents of ScopeDescRecorder to nmethod code_buffer->copy_values_to(this); debug_info->copy_to(this); dependencies->copy_to(this); if (ScavengeRootsInCode) { Universe::heap()->register_nmethod(this); } ! debug_only(Universe::heap()->verify_nmethod_roots(this)); CodeCache::commit(this); // Copy contents of ExceptionHandlerTable to nmethod handler_table->copy_to(this);
*** 2133,2143 **** } VerifyOopsClosure voc(this); oops_do(&voc); assert(voc.ok(), "embedded oops must be OK"); ! verify_scavenge_root_oops(); verify_scopes(); } --- 2124,2134 ---- } VerifyOopsClosure voc(this); oops_do(&voc); assert(voc.ok(), "embedded oops must be OK"); ! Universe::heap()->verify_nmethod_roots(this); verify_scopes(); }
*** 2226,2239 **** } virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } }; void nmethod::verify_scavenge_root_oops() { - if (UseG1GC) { - return; - } - if (!on_scavenge_root_list()) { // Actually look inside, to verify the claim that it's clean. DebugScavengeRoot debug_scavenge_root(this); oops_do(&debug_scavenge_root); if (!debug_scavenge_root.ok()) --- 2217,2226 ----
< prev index next >