< prev index next >
src/hotspot/share/code/nmethod.cpp
// This nmethod is being unloaded, make sure that dependencies
// recorded in instanceKlasses get flushed.
// Since this work is being done during a GC, defer deleting dependencies from the
// InstanceKlass.
! assert(Universe::heap()->is_gc_active(), "should only be called during gc");
flush_dependencies(/*delete_immediately*/false);
// Break cycle between nmethod & method
LogTarget(Trace, class, unload, nmethod) lt;
if (lt.is_enabled()) {
// This nmethod is being unloaded, make sure that dependencies
// recorded in instanceKlasses get flushed.
// Since this work is being done during a GC, defer deleting dependencies from the
// InstanceKlass.
! assert(Universe::heap()->is_gc_active() || Thread::current()->is_ConcurrentGC_thread(),
! "should only be called during gc");
flush_dependencies(/*delete_immediately*/false);
// Break cycle between nmethod & method
LogTarget(Trace, class, unload, nmethod) lt;
if (lt.is_enabled()) {
***************
}
_method = NULL; // Clear the method of this dead nmethod
}
// Make the class unloaded - i.e., change state and notify sweeper
! assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
// Unregister must be done before the state change
Universe::heap()->unregister_nmethod(this);
// Log the unloading.
}
_method = NULL; // Clear the method of this dead nmethod
}
// Make the class unloaded - i.e., change state and notify sweeper
! assert(SafepointSynchronize::is_at_safepoint() || Thread::current()->is_ConcurrentGC_thread(),
! "must be at safepoint");
// Unregister must be done before the state change
Universe::heap()->unregister_nmethod(this);
// Log the unloading.
***************
_speculation_log = NULL;
}
}
void nmethod::maybe_invalidate_installed_code() {
+ if (!is_compiled_by_jvmci()) {
+ return;
+ }
+
assert(Patching_lock->is_locked() ||
SafepointSynchronize::is_at_safepoint(), "should be performed under a lock for consistency");
oop installed_code = JNIHandles::resolve(_jvmci_installed_code);
if (installed_code != NULL) {
// Update the values in the InstalledCode instance if it still refers to this nmethod
< prev index next >