Skip to content

Commit 4c4003e

Browse files
author
neliasso
committed
8192971: LockCompilationTest fails intermittently
Summary: Remove all unnecessary compilations Reviewed-by: kvn, thartmann
1 parent 89c78af commit 4c4003e

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* sun.hotspot.WhiteBox$WhiteBoxPermission
3434
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
3535
* -XX:+WhiteBoxAPI -XX:-UseCounterDecay
36+
* -XX:CompileCommand=compileonly,*SimpleTestCaseHelper::method
3637
* compiler.whitebox.LockCompilationTest
3738
*/
3839

@@ -46,20 +47,7 @@ public static void main(String[] args) throws Exception {
4647
// This case waits for 5 seconds and verifies that the method hasn't been
4748
// compiled during that time. Only do that for one of the test cases.
4849

49-
// Only compile SimpleTestCaseHelper.method and exclude all other to ensure no
50-
// contention on the compile queue causes problems.
51-
String directive =
52-
"[{ match:\"*SimpleTestCaseHelper.method\", Exclude:false}, " +
53-
" { match:\"*.*\", Exclude:true}]";
54-
if (WHITE_BOX.addCompilerDirective(directive) != 2) {
55-
throw new RuntimeException("Could not add directive");
56-
}
57-
try {
58-
CompilerWhiteBoxTest.main(LockCompilationTest::new, new String[] {"METHOD_TEST"});
59-
} finally {
60-
WHITE_BOX.removeCompilerDirective(2);
61-
}
62-
50+
CompilerWhiteBoxTest.main(LockCompilationTest::new, new String[] {"METHOD_TEST"});
6351
}
6452

6553
private LockCompilationTest(TestCase testCase) {

0 commit comments

Comments
 (0)