diff src/share/vm/code/nmethod.cpp @ 13074:78da3894b86f

8027593: performance drop with constrained codecache starting with hs25 b111 Summary: Fixed proper sweeping of small code cache sizes Reviewed-by: kvn, iveresov
author anoll
date Tue, 12 Nov 2013 09:32:50 +0100
parents e2509677809c
children 096c224171c4 df832bd8edb9 da862781b584
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Mon Nov 11 11:53:33 2013 -0800
+++ b/src/share/vm/code/nmethod.cpp	Tue Nov 12 09:32:50 2013 +0100
@@ -1259,7 +1259,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() {
@@ -1293,7 +1293,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");
@@ -1417,9 +1419,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;
 }