8027593: performance drop with constrained codecache starting with hs25 b111

Fixed proper sweeping of small code cache sizes

Reviewed-by: kvn, iveresov
This commit is contained in:
Albert Noll 2013-11-12 09:32:50 +01:00
parent c632cad9d5
commit 18ca4cc301
7 changed files with 184 additions and 121 deletions

View file

@ -1259,7 +1259,7 @@ void nmethod::make_unloaded(BoolObjectClosure* is_alive, oop cause) {
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() {
@ -1293,7 +1293,9 @@ void nmethod::log_state_change() const {
}
}
// 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");
@ -1417,9 +1419,7 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
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;
}