test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
author iignatyev
Thu, 02 Aug 2018 14:40:55 -0700
changeset 51287 7b1ddbafa134
parent 49358 0dc249f5c260
child 51606 18afb2097ada
permissions -rw-r--r--
8208655: use JTreg skipped status in hotspot tests Reviewed-by: kvn, hseigel, iklam
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     1
/*
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 49358
diff changeset
     2
 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     4
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     8
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    13
 * accompanied this code).
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    14
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    18
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    21
 * questions.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    22
 */
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    23
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    24
/*
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    25
 * @test
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    26
 * @bug 8136421
42607
acd91f1875d4 8170227: use vm.jvmci property in compiler/jvmci tests
iignatyev
parents: 40631
diff changeset
    27
 * @requires vm.jvmci
40076
1e283716fd17 8161508: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before materialization
dpochepk
parents: 40059
diff changeset
    28
 *         & (vm.compMode != "Xcomp" | vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true)
1e283716fd17 8161508: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before materialization
dpochepk
parents: 40059
diff changeset
    29
 * @summary no "-Xcomp -XX:-TieredCompilation" combination allowed until JDK-8140018 is resolved
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 40076
diff changeset
    30
 * @library / /test/lib
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    31
 * @library ../common/patches
38152
80e5da81fb2c 8154258: [TESTBUG] Various serviceability tests fail compilation
dsamersoff
parents: 36508
diff changeset
    32
 * @modules java.base/jdk.internal.misc
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    33
 * @modules java.base/jdk.internal.org.objectweb.asm
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    34
 *          java.base/jdk.internal.org.objectweb.asm.tree
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents: 43961
diff changeset
    35
 *          jdk.internal.vm.ci/jdk.vm.ci.hotspot
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents: 43961
diff changeset
    36
 *          jdk.internal.vm.ci/jdk.vm.ci.code
49358
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
    37
 *          jdk.internal.vm.ci/jdk.vm.ci.code.stack
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents: 43961
diff changeset
    38
 *          jdk.internal.vm.ci/jdk.vm.ci.meta
40053
b3617982544e 8160657: Compiler HotSpot tests should use the "run driver" directive where applicable
iignatyev
parents: 39291
diff changeset
    39
 *
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents: 43961
diff changeset
    40
 * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
40053
b3617982544e 8160657: Compiler HotSpot tests should use the "run driver" directive where applicable
iignatyev
parents: 39291
diff changeset
    41
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
b3617982544e 8160657: Compiler HotSpot tests should use the "run driver" directive where applicable
iignatyev
parents: 39291
diff changeset
    42
 *                                sun.hotspot.WhiteBox$WhiteBoxPermission
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    43
 * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:.
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    44
 *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    45
 *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    46
 *                   -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    47
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    48
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    49
 *                   -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    50
 *                   -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    51
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    52
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    53
 *                   compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    54
 * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:.
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    55
 *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    56
 *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    57
 *                   -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    58
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    59
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    60
 *                   -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
40076
1e283716fd17 8161508: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before materialization
dpochepk
parents: 40059
diff changeset
    61
 *                   -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    62
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    63
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    64
 *                   compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    65
 * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:.
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    66
 *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    67
 *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    68
 *                   -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    69
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    70
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    71
 *                   -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
40076
1e283716fd17 8161508: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before materialization
dpochepk
parents: 40059
diff changeset
    72
 *                   -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    73
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    74
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    75
 *                   compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    76
 * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:.
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    77
 *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    78
 *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    79
 *                   -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    80
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    81
 *                   -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    82
 *                   -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    83
 *                   -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
    84
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    85
 *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 35148
diff changeset
    86
 *                   compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    87
 */
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    88
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    89
package compiler.jvmci.compilerToVM;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    90
33632
038347770a9e 8139170: JVMCI refresh
twisti
parents: 33191
diff changeset
    91
import compiler.jvmci.common.CTVMUtilities;
038347770a9e 8139170: JVMCI refresh
twisti
parents: 33191
diff changeset
    92
import compiler.testlibrary.CompilerUtils;
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
    93
import compiler.whitebox.CompilerWhiteBoxTest;
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 40053
diff changeset
    94
import jdk.test.lib.Asserts;
49358
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
    95
import jdk.vm.ci.code.stack.InspectedFrame;
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 40053
diff changeset
    96
import jdk.vm.ci.hotspot.CompilerToVMHelper;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 40053
diff changeset
    97
import jdk.vm.ci.hotspot.HotSpotStackFrameReference;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 40053
diff changeset
    98
import jdk.vm.ci.meta.ResolvedJavaMethod;
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 49358
diff changeset
    99
import jtreg.SkippedException;
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 40053
diff changeset
   100
import sun.hotspot.WhiteBox;
33632
038347770a9e 8139170: JVMCI refresh
twisti
parents: 33191
diff changeset
   101
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 40053
diff changeset
   102
import java.lang.reflect.Method;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   103
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   104
public class MaterializeVirtualObjectTest {
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   105
    private static final WhiteBox WB;
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   106
    private static final boolean INVALIDATE;
38700
6aa6444c1b48 8157438: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before"
dpochepk
parents: 38688
diff changeset
   107
    private static final int COMPILE_THRESHOLD;
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   108
    private static final Method MATERIALIZED_METHOD;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   109
    private static final Method NOT_MATERIALIZED_METHOD;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   110
    private static final ResolvedJavaMethod MATERIALIZED_RESOLVED;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   111
    private static final ResolvedJavaMethod NOT_MATERIALIZED_RESOLVED;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   112
    private static final boolean MATERIALIZE_FIRST;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   113
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   114
    static {
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   115
        Method method1;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   116
        Method method2;
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   117
        WB = WhiteBox.getWhiteBox();
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   118
        try {
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   119
            method1 = MaterializeVirtualObjectTest.class.getDeclaredMethod("testFrame",
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   120
                    String.class, int.class);
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   121
            method2 = MaterializeVirtualObjectTest.class.getDeclaredMethod("testFrame2",
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   122
                    String.class, int.class);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   123
        } catch (NoSuchMethodException e) {
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   124
            throw new Error("Can't get executable for test method", e);
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   125
        }
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   126
        ResolvedJavaMethod resolved1;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   127
        ResolvedJavaMethod resolved2;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   128
        resolved1 = CTVMUtilities.getResolvedMethod(method1);
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   129
        resolved2 = CTVMUtilities.getResolvedMethod(method2);
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   130
        INVALIDATE = Boolean.getBoolean(
38700
6aa6444c1b48 8157438: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before"
dpochepk
parents: 38688
diff changeset
   131
                "compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate");
6aa6444c1b48 8157438: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before"
dpochepk
parents: 38688
diff changeset
   132
        COMPILE_THRESHOLD = WB.getBooleanVMFlag("TieredCompilation")
6aa6444c1b48 8157438: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before"
dpochepk
parents: 38688
diff changeset
   133
                ? CompilerWhiteBoxTest.THRESHOLD
6aa6444c1b48 8157438: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before"
dpochepk
parents: 38688
diff changeset
   134
                : CompilerWhiteBoxTest.THRESHOLD * 2;
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   135
        MATERIALIZE_FIRST = Boolean.getBoolean(
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   136
                "compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   137
        MATERIALIZED_RESOLVED = MATERIALIZE_FIRST ? resolved1 : resolved2;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   138
        NOT_MATERIALIZED_RESOLVED = MATERIALIZE_FIRST ? resolved2 : resolved1;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   139
        MATERIALIZED_METHOD = MATERIALIZE_FIRST ? method1 : method2;
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   140
        NOT_MATERIALIZED_METHOD = MATERIALIZE_FIRST ? method2 : method1;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   141
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   142
33184
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   143
    public static void main(String[] args) {
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   144
        int levels[] = CompilerUtils.getAvailableCompilationLevels();
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   145
        // we need compilation level 4 to use EscapeAnalysis
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   146
        if (levels.length < 1 || levels[levels.length - 1] != 4) {
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 49358
diff changeset
   147
            throw new SkippedException("Test needs compilation level 4");
33184
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   148
        }
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 49358
diff changeset
   149
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 49358
diff changeset
   150
        new MaterializeVirtualObjectTest().test();
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   151
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   152
33184
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   153
    private static String getName() {
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   154
        return "CASE: invalidate=" + INVALIDATE + ", materializedMethod="
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   155
                + (MATERIALIZE_FIRST ? "testFrame" : "testFrame2")
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   156
                + ", notMaterializedMethod="
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   157
                + (MATERIALIZE_FIRST ? "testFrame2" : "testFrame");
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   158
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   159
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   160
    private void test() {
33184
db796ab93ba7 8139438: [TESTBUG] JVMCI test fails with RuntimeException: Has no virtual object before materialization
dpochepk
parents: 33160
diff changeset
   161
        System.out.println(getName());
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   162
        Asserts.assertFalse(WB.isMethodCompiled(MATERIALIZED_METHOD),
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   163
                getName() + " : materialized method is compiled");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   164
        Asserts.assertFalse(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD),
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   165
                getName() + " : not materialized method is compiled");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   166
        for (int i = 0; i < CompilerWhiteBoxTest.THRESHOLD; i++) {
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   167
            testFrame("someString", i);
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   168
        }
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   169
        Asserts.assertTrue(WB.isMethodCompiled(MATERIALIZED_METHOD), getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   170
                + " : materialized method not compiled");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   171
        Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD),
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   172
                getName() + " : not materialized method not compiled");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   173
        testFrame("someString", /* materialize */ CompilerWhiteBoxTest.THRESHOLD);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   174
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   175
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   176
    private void testFrame(String str, int iteration) {
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   177
        Helper helper = new Helper(str);
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   178
        testFrame2(str, iteration);
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   179
        Asserts.assertTrue((helper.string != null) && (this != null)
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   180
                && (helper != null), String.format("%s : some locals are null", getName()));
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   181
     }
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   182
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   183
    private void testFrame2(String str, int iteration) {
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   184
        Helper helper = new Helper(str);
43672
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   185
        recurse(2, iteration);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   186
        Asserts.assertTrue((helper.string != null) && (this != null)
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   187
                && (helper != null), String.format("%s : some locals are null", getName()));
43672
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   188
    }
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   189
43672
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   190
    private void recurse(int depth, int iteration) {
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   191
        if (depth == 0) {
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   192
            check(iteration);
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   193
        } else {
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   194
            Integer s = new Integer(depth);
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   195
            recurse(depth - 1, iteration);
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   196
            Asserts.assertEQ(s.intValue(), depth,
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   197
                    String.format("different values: %s != %s", s.intValue(), depth));
43672
b188841d7ac8 8173584: Add unit test for 8173309
never
parents: 42607
diff changeset
   198
        }
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   199
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   200
38688
ad115177801f 8139703: [TESTBUG] compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest fails using -Xcomp
dpochepk
parents: 38152
diff changeset
   201
    private void check(int iteration) {
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   202
        // Materialize virtual objects on last invocation
38700
6aa6444c1b48 8157438: JVMCI: MaterializeVirtualObjectTest fails w/ "CASE: invalidate=true: has no virtual object before"
dpochepk
parents: 38688
diff changeset
   203
        if (iteration == COMPILE_THRESHOLD) {
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   204
            // get frames and check not-null
49358
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   205
            HotSpotStackFrameReference materialized = CompilerToVMHelper.iterateFrames(
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   206
                new ResolvedJavaMethod[] {MATERIALIZED_RESOLVED},
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   207
                null /* any */,
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   208
                0,
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   209
                f -> (HotSpotStackFrameReference) f);
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   210
            Asserts.assertNotNull(materialized, getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   211
                    + " : got null frame for materialized method");
49358
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   212
            Asserts.assertTrue(materialized.isMethod(MATERIALIZED_RESOLVED),
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   213
                "Expected materialized method but got " + materialized);
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   214
            InspectedFrame notMaterialized = CompilerToVMHelper.iterateFrames(
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   215
                new ResolvedJavaMethod[] {NOT_MATERIALIZED_RESOLVED},
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   216
                null /* any */,
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   217
                0,
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   218
                f -> f);
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   219
            Asserts.assertNE(materialized, notMaterialized,
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   220
                    "Got same frame pointer for both tested frames");
49358
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   221
            Asserts.assertTrue(notMaterialized.isMethod(NOT_MATERIALIZED_RESOLVED),
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   222
                "Expected notMaterialized method but got " + notMaterialized);
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   223
            Asserts.assertNotNull(notMaterialized, getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   224
                    + " : got null frame for not materialized method");
49358
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   225
            Asserts.assertTrue(WB.isMethodCompiled(MATERIALIZED_METHOD), getName()
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   226
                + " : materialized method not compiled");
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   227
            Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD),
0dc249f5c260 8194490: [JVMCI] Move `iterateFrames` to C++
gdub
parents: 47216
diff changeset
   228
                getName() + " : not materialized method not compiled");
43961
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   229
            // check that frames has virtual objects before materialization stage
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   230
            Asserts.assertTrue(materialized.hasVirtualObjects(), getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   231
                    + ": materialized frame has no virtual object before materialization");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   232
            Asserts.assertTrue(notMaterialized.hasVirtualObjects(), getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   233
                    + ": notMaterialized frame has no virtual object before materialization");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   234
            // materialize
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   235
            CompilerToVMHelper.materializeVirtualObjects(materialized, INVALIDATE);
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   236
            // check that only not materialized frame has virtual objects
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   237
            Asserts.assertFalse(materialized.hasVirtualObjects(), getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   238
                    + " : materialized has virtual object after materialization");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   239
            Asserts.assertTrue(notMaterialized.hasVirtualObjects(), getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   240
                    + " : notMaterialized has no virtual object after materialization");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   241
            // check that materialized frame was deoptimized in case invalidate=true
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   242
            Asserts.assertEQ(WB.isMethodCompiled(MATERIALIZED_METHOD), !INVALIDATE, getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   243
                    + " : materialized method has unexpected compiled status");
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   244
            // check that not materialized frame wasn't deoptimized
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   245
            Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), getName()
441de9600d40 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest
dpochepk
parents: 43672
diff changeset
   246
                    + " : not materialized method has unexpected compiled status");
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   247
        }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   248
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   249
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   250
    private class Helper {
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   251
        public String string;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   252
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   253
        public Helper(String s) {
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   254
            this.string = s;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   255
        }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   256
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   257
}