< prev index next >

src/hotspot/share/code/nmethod.cpp


*** 1364,1375 **** if (on_scavenge_root_list()) { CodeCache::drop_scavenge_root_nmethod(this); } #if INCLUDE_JVMCI ! assert(_jvmci_installed_code == NULL, "should have been nulled out when transitioned to zombie"); ! assert(_speculation_log == NULL, "should have been nulled out when transitioned to zombie"); #endif CodeBlob::flush(); CodeCache::free(this); } --- 1364,1375 ---- if (on_scavenge_root_list()) { CodeCache::drop_scavenge_root_nmethod(this); } #if INCLUDE_JVMCI ! clear_jvmci_installed_code(); ! clear_speculation_log(); #endif CodeBlob::flush(); CodeCache::free(this); } ***************
*** 1660,1676 **** if (is_unloading()) { make_unloaded(); } else { #if INCLUDE_JVMCI ! if (_jvmci_installed_code != NULL) { ! if (JNIHandles::is_global_weak_cleared(_jvmci_installed_code)) { ! if (_jvmci_installed_code_triggers_invalidation) { ! make_not_entrant(); ! } ! clear_jvmci_installed_code(); ! } } #endif guarantee(unload_nmethod_caches(unloading_occurred), "Should not need transition stubs"); --- 1660,1673 ---- if (is_unloading()) { make_unloaded(); } else { #if INCLUDE_JVMCI ! if (_jvmci_installed_code != NULL && ! JNIHandles::is_global_weak_cleared(_jvmci_installed_code) && ! _jvmci_installed_code_triggers_invalidation) { ! make_not_entrant(); } #endif guarantee(unload_nmethod_caches(unloading_occurred), "Should not need transition stubs"); ***************
*** 2957,2975 **** #endif // !PRODUCT #if INCLUDE_JVMCI void nmethod::clear_jvmci_installed_code() { - assert_locked_or_safepoint(Patching_lock); if (_jvmci_installed_code != NULL) { JNIHandles::destroy_weak_global(_jvmci_installed_code); _jvmci_installed_code = NULL; } } void nmethod::clear_speculation_log() { - assert_locked_or_safepoint(Patching_lock); if (_speculation_log != NULL) { JNIHandles::destroy_weak_global(_speculation_log); _speculation_log = NULL; } } --- 2954,2970 ---- ***************
*** 2999,3014 **** // be invalidated. InstalledCode::set_entryPoint(installed_code, 0); } } } - if (!is_alive() || is_unloading()) { - // Clear these out after the nmethod has been unregistered and any - // updates to the InstalledCode instance have been performed. - clear_jvmci_installed_code(); - clear_speculation_log(); - } } void nmethod::invalidate_installed_code(Handle installedCode, TRAPS) { if (installedCode() == NULL) { THROW(vmSymbols::java_lang_NullPointerException()); --- 2994,3003 ----
< prev index next >