src/share/vm/code/nmethod.cpp

changeset 6099
78da3894b86f
parent 6096
e2509677809c
child 6172
df832bd8edb9
child 6485
da862781b584
equal deleted inserted replaced
6098:1dcea64e9f00 6099:78da3894b86f
1257 // The Method* is gone at this point 1257 // The Method* is gone at this point
1258 assert(_method == NULL, "Tautology"); 1258 assert(_method == NULL, "Tautology");
1259 1259
1260 set_osr_link(NULL); 1260 set_osr_link(NULL);
1261 //set_scavenge_root_link(NULL); // done by prune_scavenge_root_nmethods 1261 //set_scavenge_root_link(NULL); // done by prune_scavenge_root_nmethods
1262 NMethodSweeper::notify(); 1262 NMethodSweeper::report_state_change(this);
1263 } 1263 }
1264 1264
1265 void nmethod::invalidate_osr_method() { 1265 void nmethod::invalidate_osr_method() {
1266 assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod"); 1266 assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod");
1267 // Remove from list of active nmethods 1267 // Remove from list of active nmethods
1291 if (PrintCompilation && _state != unloaded) { 1291 if (PrintCompilation && _state != unloaded) {
1292 print_on(tty, _state == zombie ? "made zombie" : "made not entrant"); 1292 print_on(tty, _state == zombie ? "made zombie" : "made not entrant");
1293 } 1293 }
1294 } 1294 }
1295 1295
1296 // Common functionality for both make_not_entrant and make_zombie 1296 /**
1297 * Common functionality for both make_not_entrant and make_zombie
1298 */
1297 bool nmethod::make_not_entrant_or_zombie(unsigned int state) { 1299 bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
1298 assert(state == zombie || state == not_entrant, "must be zombie or not_entrant"); 1300 assert(state == zombie || state == not_entrant, "must be zombie or not_entrant");
1299 assert(!is_zombie(), "should not already be a zombie"); 1301 assert(!is_zombie(), "should not already be a zombie");
1300 1302
1301 // Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below. 1303 // Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
1415 1417
1416 if (TraceCreateZombies) { 1418 if (TraceCreateZombies) {
1417 tty->print_cr("nmethod <" INTPTR_FORMAT "> code made %s", this, (state == not_entrant) ? "not entrant" : "zombie"); 1419 tty->print_cr("nmethod <" INTPTR_FORMAT "> code made %s", this, (state == not_entrant) ? "not entrant" : "zombie");
1418 } 1420 }
1419 1421
1420 // Make sweeper aware that there is a zombie method that needs to be removed 1422 NMethodSweeper::report_state_change(this);
1421 NMethodSweeper::notify();
1422
1423 return true; 1423 return true;
1424 } 1424 }
1425 1425
1426 void nmethod::flush() { 1426 void nmethod::flush() {
1427 // Note that there are no valid oops in the nmethod anymore. 1427 // Note that there are no valid oops in the nmethod anymore.

mercurial