src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompilationWrapperTest.java
changeset 59095 03fbcd06b4c0
parent 58299 6df94ce3ab2f
equal deleted inserted replaced
59094:5d4c3724e4c7 59095:03fbcd06b4c0
   120      */
   120      */
   121     @Test
   121     @Test
   122     public void testVMCompilation3() throws IOException, InterruptedException {
   122     public void testVMCompilation3() throws IOException, InterruptedException {
   123         assumeManagementLibraryIsLoadable();
   123         assumeManagementLibraryIsLoadable();
   124         final int maxProblems = 2;
   124         final int maxProblems = 2;
       
   125         Probe failurePatternProbe = new Probe("[[[Graal compilation failure]]]", maxProblems) {
       
   126             @Override
       
   127             String test() {
       
   128                 return actualOccurrences > 0 && actualOccurrences <= maxProblems ? null : String.format("expected occurrences to be in [1 .. %d]", maxProblems);
       
   129             }
       
   130         };
   125         Probe retryingProbe = new Probe("Retrying compilation of", maxProblems) {
   131         Probe retryingProbe = new Probe("Retrying compilation of", maxProblems) {
   126             @Override
   132             @Override
   127             String test() {
   133             String test() {
   128                 return actualOccurrences > 0 && actualOccurrences <= maxProblems ? null : String.format("expected occurrences to be in [1 .. %d]", maxProblems);
   134                 return actualOccurrences > 0 && actualOccurrences <= maxProblems ? null : String.format("expected occurrences to be in [1 .. %d]", maxProblems);
   129             }
   135             }
   138                 }
   144                 }
   139                 return null;
   145                 return null;
   140             }
   146             }
   141         };
   147         };
   142         Probe[] probes = {
   148         Probe[] probes = {
       
   149                         failurePatternProbe,
   143                         retryingProbe,
   150                         retryingProbe,
   144                         adjustmentProbe
   151                         adjustmentProbe
   145         };
   152         };
   146         testHelper(Arrays.asList(probes), Arrays.asList("-XX:-TieredCompilation",
   153         testHelper(Arrays.asList(probes), Arrays.asList("-XX:-TieredCompilation",
   147                         "-XX:+UseJVMCICompiler",
   154                         "-XX:+UseJVMCICompiler",