8192971: LockCompilationTest fails intermittently
authorneliasso
Wed, 13 Dec 2017 10:21:21 +0100
changeset 48321 e9e3edac1768
parent 48320 8e561c68f72a
child 48322 0cd5e2ca53dd
child 48399 cf7792800ba9
8192971: LockCompilationTest fails intermittently Summary: Remove all unnecessary compilations Reviewed-by: kvn, thartmann
test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java
--- a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java	Fri Dec 08 23:43:25 2017 +0100
+++ b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java	Wed Dec 13 10:21:21 2017 +0100
@@ -33,6 +33,7 @@
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ *                   -XX:CompileCommand=compileonly,*SimpleTestCaseHelper::method
  *                   compiler.whitebox.LockCompilationTest
  */
 
@@ -46,20 +47,7 @@
         // This case waits for 5 seconds and verifies that the method hasn't been
         // compiled during that time. Only do that for one of the test cases.
 
-        // Only compile SimpleTestCaseHelper.method and exclude all other to ensure no
-        // contention on the compile queue causes problems.
-        String directive =
-                "[{ match:\"*SimpleTestCaseHelper.method\", Exclude:false}, " +
-                " { match:\"*.*\", Exclude:true}]";
-        if (WHITE_BOX.addCompilerDirective(directive) != 2) {
-            throw new RuntimeException("Could not add directive");
-        }
-        try {
-            CompilerWhiteBoxTest.main(LockCompilationTest::new, new String[] {"METHOD_TEST"});
-        } finally {
-            WHITE_BOX.removeCompilerDirective(2);
-        }
-
+        CompilerWhiteBoxTest.main(LockCompilationTest::new, new String[] {"METHOD_TEST"});
     }
 
     private LockCompilationTest(TestCase testCase) {