8192908: -XX:+UseCountedLoopSafepoints alone doesn't disable strip mining with G1

-XX:+UseCountedLoopSafepoints should disable loop strip mining.

Reviewed-by: kvn, thartmann
This commit is contained in:
Roland Westrelin 2017-12-07 15:52:46 +01:00
parent 7c3a956755
commit 29bab311ab
2 changed files with 4 additions and 4 deletions

View File

@ -98,9 +98,9 @@ void G1Arguments::initialize_flags() {
// 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
}

View File

@ -62,7 +62,7 @@ public class UseCountedLoopSafepointsTest {
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());