1347 Universe::heap()->unregister_nmethod(this); 1348 1349 _state = unloaded; 1350 1351 // Log the unloading. 1352 log_state_change(); 1353 1354 // The Method* is gone at this point 1355 assert(_method == NULL, "Tautology"); 1356 1357 set_osr_link(NULL); 1358 //set_scavenge_root_link(NULL); // done by prune_scavenge_root_nmethods 1359 NMethodSweeper::report_state_change(this); 1360 } 1361 1362 void nmethod::invalidate_osr_method() { 1363 assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod"); 1364 // Remove from list of active nmethods 1365 if (method() != NULL) 1366 method()->method_holder()->remove_osr_nmethod(this); 1367 // Set entry as invalid 1368 _entry_bci = InvalidOSREntryBci; 1369 } 1370 1371 void nmethod::log_state_change() const { 1372 if (LogCompilation) { 1373 if (xtty != NULL) { 1374 ttyLocker ttyl; // keep the following output all in one block 1375 if (_state == unloaded) { 1376 xtty->begin_elem("make_unloaded thread='" UINTX_FORMAT "'", 1377 os::current_thread_id()); 1378 } else { 1379 xtty->begin_elem("make_not_entrant thread='" UINTX_FORMAT "'%s", 1380 os::current_thread_id(), 1381 (_state == zombie ? " zombie='1'" : "")); 1382 } 1383 log_identity(xtty); 1384 xtty->stamp(); 1385 xtty->end_elem(); 1386 } 1387 } 1388 if (PrintCompilation && _state != unloaded) { | 1347 Universe::heap()->unregister_nmethod(this); 1348 1349 _state = unloaded; 1350 1351 // Log the unloading. 1352 log_state_change(); 1353 1354 // The Method* is gone at this point 1355 assert(_method == NULL, "Tautology"); 1356 1357 set_osr_link(NULL); 1358 //set_scavenge_root_link(NULL); // done by prune_scavenge_root_nmethods 1359 NMethodSweeper::report_state_change(this); 1360 } 1361 1362 void nmethod::invalidate_osr_method() { 1363 assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod"); 1364 // Remove from list of active nmethods 1365 if (method() != NULL) 1366 method()->method_holder()->remove_osr_nmethod(this); 1367 } 1368 1369 void nmethod::log_state_change() const { 1370 if (LogCompilation) { 1371 if (xtty != NULL) { 1372 ttyLocker ttyl; // keep the following output all in one block 1373 if (_state == unloaded) { 1374 xtty->begin_elem("make_unloaded thread='" UINTX_FORMAT "'", 1375 os::current_thread_id()); 1376 } else { 1377 xtty->begin_elem("make_not_entrant thread='" UINTX_FORMAT "'%s", 1378 os::current_thread_id(), 1379 (_state == zombie ? " zombie='1'" : "")); 1380 } 1381 log_identity(xtty); 1382 xtty->stamp(); 1383 xtty->end_elem(); 1384 } 1385 } 1386 if (PrintCompilation && _state != unloaded) { |