make_unloaded assert/if?
Eric Caspole
eric.caspole at amd.com
Mon Mar 24 16:15:57 UTC 2014
In nmethod::make_unloaded, at line 1214, it asserts is_gc_active().
Then at line 1225 the print line is
if (!Universe::heap()->is_gc_active())
so it will never happen? Am I reading this right?
hotspot/src/share/vm/code/nmethod.cpp
1207 void nmethod::make_unloaded(BoolObjectClosure* is_alive, oop cause) {
1208
1209 post_compiled_method_unload();
1210
1211 // Since this nmethod is being unloaded, make sure that dependencies
1212 // recorded in instanceKlasses get flushed and pass non-NULL
closure to
1213 // indicate that this work is being done during a GC.
1214 assert(Universe::heap()->is_gc_active(), "should only be called
during gc");
1215 assert(is_alive != NULL, "Should be non-NULL");
1216 // A non-NULL is_alive closure indicates that this is being
called during GC.
1217 flush_dependencies(is_alive);
1218
1219 // Break cycle between nmethod & method
1220 if (TraceClassUnloading && WizardMode) {
1221 tty->print_cr("[Class unloading: Making nmethod " INTPTR_FORMAT
1222 " unloadable], Method*(" INTPTR_FORMAT
1223 "), cause(" INTPTR_FORMAT ")",
1224 this, (address)_method, (address)cause);
1225 if (!Universe::heap()->is_gc_active())
1226 cause->klass()->print();
1227 }
More information about the hotspot-compiler-dev
mailing list