--- old/src/share/vm/code/nmethod.cpp 2013-11-12 08:16:28.810540542 +0100 +++ new/src/share/vm/code/nmethod.cpp 2013-11-12 08:16:28.682540544 +0100 @@ -1262,7 +1262,7 @@ set_osr_link(NULL); //set_scavenge_root_link(NULL); // done by prune_scavenge_root_nmethods - NMethodSweeper::notify(); + NMethodSweeper::report_state_change(this); } void nmethod::invalidate_osr_method() { @@ -1296,7 +1296,9 @@ } } -// Common functionality for both make_not_entrant and make_zombie +/** + * Common functionality for both make_not_entrant and make_zombie + */ bool nmethod::make_not_entrant_or_zombie(unsigned int state) { assert(state == zombie || state == not_entrant, "must be zombie or not_entrant"); assert(!is_zombie(), "should not already be a zombie"); @@ -1420,9 +1422,7 @@ tty->print_cr("nmethod <" INTPTR_FORMAT "> code made %s", this, (state == not_entrant) ? "not entrant" : "zombie"); } - // Make sweeper aware that there is a zombie method that needs to be removed - NMethodSweeper::notify(); - + NMethodSweeper::report_state_change(this); return true; }