test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java
author epavlova
Mon, 02 Oct 2017 14:31:34 -0700
changeset 47576 7645833d326f
parent 47216 71c04702a3d5
child 48145 f913f6dba2d3
permissions -rw-r--r--
8185134: [Graal] Introduce vm.graal predicate and tag tests which are not applicable for Graal Reviewed-by: kvn, dnsimon
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41062
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     1
/*
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     4
 *
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     8
 *
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    13
 * accompanied this code).
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    14
 *
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    18
 *
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    21
 * questions.
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    22
 *
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    23
 */
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    24
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    25
/**
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    26
 * @test
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    27
 * @bug 6869327
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    28
 * @summary Test that C2 flag UseCountedLoopSafepoints ensures a safepoint is kept in a CountedLoop
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    29
 * @library /test/lib /
43434
d384dd8f82df 8166374: compiler/loopopts/UseCountedLoopSafepointsTest.java fails with "Safepoint not found"
dpochepk
parents: 41062
diff changeset
    30
 * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) & vm.debug == true
47576
7645833d326f 8185134: [Graal] Introduce vm.graal predicate and tag tests which are not applicable for Graal
epavlova
parents: 47216
diff changeset
    31
 * @requires !vm.emulatedClient & !vm.graal.enabled
41062
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    32
 * @modules java.base/jdk.internal.misc
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    33
 * @build sun.hotspot.WhiteBox
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    34
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    35
 *                                sun.hotspot.WhiteBox$WhiteBoxPermission
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    36
 * @run driver compiler.loopopts.UseCountedLoopSafepointsTest
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    37
 */
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    38
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    39
package compiler.loopopts;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    40
43455
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 43434
diff changeset
    41
import jdk.test.lib.Platform;
41062
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    42
import jdk.test.lib.process.ProcessTools;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    43
import jdk.test.lib.process.OutputAnalyzer;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    44
import java.util.List;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    45
import java.util.ArrayList;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    46
import java.util.Arrays;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    47
import java.util.Collections;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    48
import jdk.test.lib.Asserts;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    49
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    50
/* Idea of this test is to check if ideal graph has CountedLoopEnd->SafePoint edge in case
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    51
   of UseCountedLoopSafepoint enabled and has no such edge in case it's disabled. Restricting
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    52
   compilation to testMethod only will leave only one counted loop (the one in testedMethod) */
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    53
public class UseCountedLoopSafepointsTest {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    54
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    55
    public static void main (String args[]) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    56
        check(true); // check ideal graph with UseCountedLoopSafepoint enabled
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    57
        check(false); // ... and disabled
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    58
    }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    59
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    60
    private static void check(boolean enabled) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    61
        OutputAnalyzer oa;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    62
        try {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    63
            oa = ProcessTools.executeTestJvm("-XX:+UnlockDiagnosticVMOptions", "-Xbootclasspath/a:.",
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    64
                    "-XX:" + (enabled ? "+" : "-") + "UseCountedLoopSafepoints", "-XX:+WhiteBoxAPI",
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    65
                    "-XX:-Inline", "-Xbatch", "-XX:+PrintIdeal", "-XX:LoopUnrollLimit=0",
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    66
                    "-XX:CompileOnly=" + UseCountedLoopSafepoints.class.getName() + "::testMethod",
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    67
                    UseCountedLoopSafepoints.class.getName());
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    68
        } catch (Exception e) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    69
            throw new Error("Exception launching child for case enabled=" + enabled + " : " + e, e);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    70
        }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    71
        oa.shouldHaveExitValue(0);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    72
        // parse output in seach of SafePoint and CountedLoopEnd nodes
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    73
        List<Node> safePoints = new ArrayList<>();
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    74
        List<Node> loopEnds = new ArrayList<>();
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    75
        for (String line : oa.getOutput().split("\\n")) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    76
            int separatorIndex = line.indexOf("\t===");
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    77
            if (separatorIndex > -1) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    78
                String header = line.substring(0, separatorIndex);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    79
                if (header.endsWith("\tSafePoint")) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    80
                    safePoints.add(new Node("SafePoint", line));
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    81
                } else if (header.endsWith("\tCountedLoopEnd")) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    82
                    loopEnds.add(new Node("CountedLoopEnd", line));
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    83
                }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    84
            }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    85
        }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    86
        // now, find CountedLoopEnd -> SafePoint edge
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    87
        boolean found = false;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    88
        for (Node loopEnd : loopEnds) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    89
            found |= loopEnd.to.stream()
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    90
                                 .filter(id -> nodeListHasElementWithId(safePoints, id))
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    91
                                 .findAny()
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    92
                                 .isPresent();
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    93
        }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    94
        Asserts.assertEQ(enabled, found, "Safepoint " + (found ? "" : "not ") + "found");
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    95
    }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    96
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    97
    private static boolean nodeListHasElementWithId(List<Node> list, int id) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    98
        return list.stream()
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
    99
                   .filter(node -> node.id == id)
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   100
                   .findAny()
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   101
                   .isPresent();
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   102
    }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   103
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   104
    private static class Node {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   105
        public final int id;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   106
        public final List<Integer> from;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   107
        public final List<Integer> to;
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   108
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   109
        public Node(String name, String str) {
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   110
            List<Integer> tmpFrom = new ArrayList<>();
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   111
            List<Integer> tmpTo = new ArrayList<>();
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   112
            // parse string like: " $id    $name       ===  $to1 $to2 ...   [[ $from1 $from2 ... ]] $anything"
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   113
            // example:  318    SafePoint       ===  317  1  304  1  1  10  308  [[ 97  74 ]]  ...
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   114
            id = Integer.parseInt(str.substring(1, str.indexOf(name)).trim());
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   115
            Arrays.stream(str.substring(str.indexOf("===") + 4, str.indexOf("[[")).trim().split("\\s+"))
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   116
                  .map(Integer::parseInt)
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   117
                  .forEach(tmpTo::add);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   118
            Arrays.stream(str.substring(str.indexOf("[[") + 3, str.indexOf("]]")).trim().split("\\s+"))
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   119
                  .map(Integer::parseInt)
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   120
                  .forEach(tmpFrom::add);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   121
            this.from = Collections.unmodifiableList(tmpFrom);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   122
            this.to = Collections.unmodifiableList(tmpTo);
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   123
        }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   124
    }
9977744ce3d8 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
dpochepk
parents:
diff changeset
   125
}