8192908: -XX:+UseCountedLoopSafepoints alone doesn't disable strip mining with G1
authorroland
Thu, 07 Dec 2017 15:52:46 +0100
changeset 48316 4d28288c9f9e
parent 48315 32fd4be602d5
child 48317 8bb6cdfa44eb
8192908: -XX:+UseCountedLoopSafepoints alone doesn't disable strip mining with G1 Summary: -XX:+UseCountedLoopSafepoints should disable loop strip mining. Reviewed-by: kvn, thartmann
src/hotspot/share/gc/g1/g1Arguments.cpp
test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java
--- a/src/hotspot/share/gc/g1/g1Arguments.cpp	Thu Dec 07 10:18:31 2017 +0100
+++ b/src/hotspot/share/gc/g1/g1Arguments.cpp	Thu Dec 07 15:52:46 2017 +0100
@@ -98,9 +98,9 @@
   // Enable loop strip mining to offer better pause time guarantees
   if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
     FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
-  }
-  if (UseCountedLoopSafepoints && FLAG_IS_DEFAULT(LoopStripMiningIter)) {
-    FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
+    if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
+      FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
+    }
   }
 #endif
 }
--- a/test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java	Thu Dec 07 10:18:31 2017 +0100
+++ b/test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java	Thu Dec 07 15:52:46 2017 +0100
@@ -62,7 +62,7 @@
         try {
             oa = ProcessTools.executeTestJvm("-XX:+UnlockDiagnosticVMOptions", "-Xbootclasspath/a:.",
                                              "-XX:" + (enabled ? "+" : "-") + "UseCountedLoopSafepoints",
-                                             "-XX:LoopStripMiningIter=" + (enabled ? "1" : "0"), "-XX:+WhiteBoxAPI",
+                                             "-XX:+WhiteBoxAPI",
                     "-XX:-Inline", "-Xbatch", "-XX:+PrintIdeal", "-XX:LoopUnrollLimit=0",
                     "-XX:CompileOnly=" + UseCountedLoopSafepoints.class.getName() + "::testMethod",
                     UseCountedLoopSafepoints.class.getName());