diff src/share/vm/runtime/arguments.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 3b3133d93fb6
children 6f206b5d258f
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Mon Nov 11 11:53:33 2013 -0800
+++ b/src/share/vm/runtime/arguments.cpp	Tue Nov 12 09:32:50 2013 +0100
@@ -1132,9 +1132,6 @@
     Tier3InvokeNotifyFreqLog = 0;
     Tier4InvocationThreshold = 0;
   }
-  if (FLAG_IS_DEFAULT(NmethodSweepFraction)) {
-    FLAG_SET_DEFAULT(NmethodSweepFraction, 1 + ReservedCodeCacheSize / (16 * M));
-  }
 }
 
 #if INCLUDE_ALL_GCS
@@ -3643,6 +3640,11 @@
         "Incompatible compilation policy selected", NULL);
     }
   }
+  // Set NmethodSweepFraction after the size of the code cache is adapted (in case of tiered)
+  if (FLAG_IS_DEFAULT(NmethodSweepFraction)) {
+    FLAG_SET_DEFAULT(NmethodSweepFraction, 1 + ReservedCodeCacheSize / (16 * M));
+  }
+
 
   // Set heap size based on available physical memory
   set_heap_size();