test/hotspot/jtreg/compiler/profiling/TestTypeProfiling.java
author iignatyev
Wed, 13 Nov 2019 11:34:31 -0800
changeset 59064 f1a5d48d0471
parent 52590 c6b63df2765f
permissions -rw-r--r--
8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set Reviewed-by: redestad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     1
/*
59064
f1a5d48d0471 8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set
iignatyev
parents: 52590
diff changeset
     2
 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     4
 *
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     8
 *
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    13
 * accompanied this code).
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    14
 *
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    18
 *
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    21
 * questions.
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    22
 */
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    23
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    24
 /**
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    25
  * @test
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    26
  * @bug 8189439
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    27
  * @summary Parameters type profiling is not performed from aarch64 interpreter
59064
f1a5d48d0471 8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set
iignatyev
parents: 52590
diff changeset
    28
  *
52590
c6b63df2765f 8213794: ARM32: disable TypeProfiling, CriticalJNINatives, Serviceablity tests for ARM32
bulasevich
parents: 52005
diff changeset
    29
  * @requires os.arch != "arm"
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    30
  * @requires vm.flavor == "server" & vm.compMode == "Xmixed" & !vm.emulatedClient & !vm.graal.enabled
59064
f1a5d48d0471 8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set
iignatyev
parents: 52590
diff changeset
    31
  *
f1a5d48d0471 8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set
iignatyev
parents: 52590
diff changeset
    32
  * @comment the test can't be run w/ TieredStopAtLevel < 4
f1a5d48d0471 8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set
iignatyev
parents: 52590
diff changeset
    33
  * @requires vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4
f1a5d48d0471 8226795: compiler/tiered/Level2RecompilationTest.java fails when XX:TieredStopAtLevel=1/2/3 is set
iignatyev
parents: 52590
diff changeset
    34
  *
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    35
  * @library /test/lib /
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    36
  * @build sun.hotspot.WhiteBox
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    37
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    38
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    39
  *                   -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
52005
4236fa9582bb 8211392: compiler/profiling/spectrapredefineclass_classloaders/Launcher.java times out in JDK12 CI
kvn
parents: 51073
diff changeset
    40
  *                   -XX:CompileThreshold=10000
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    41
  *                   -server -XX:-TieredCompilation -XX:TypeProfileLevel=020
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    42
  *                    compiler.profiling.TestTypeProfiling
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    43
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    44
  *                   -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
52005
4236fa9582bb 8211392: compiler/profiling/spectrapredefineclass_classloaders/Launcher.java times out in JDK12 CI
kvn
parents: 51073
diff changeset
    45
  *                   -XX:CompileThreshold=10000
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    46
  *                   -server -XX:-TieredCompilation -XX:TypeProfileLevel=200
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    47
  *                    compiler.profiling.TestTypeProfiling
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    48
  */
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    49
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    50
package compiler.profiling;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    51
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    52
import jdk.test.lib.Platform;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    53
import sun.hotspot.WhiteBox;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    54
import compiler.whitebox.CompilerWhiteBoxTest;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    55
import java.lang.reflect.Method;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    56
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    57
public class TestTypeProfiling {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    58
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    59
    public static int[] mParamTypeCheck(Object in) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    60
        try {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    61
            return (int[]) in;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    62
        } catch (ClassCastException cce) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    63
            return null;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    64
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    65
    }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    66
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    67
    static Object x2(Object src) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    68
        return src;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    69
    }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    70
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    71
    public static int[] mRetTypeCheck(Object in) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    72
        try {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    73
            Object out = x2(in);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    74
            return (int[]) out;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    75
        } catch (ClassCastException cce) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    76
            return null;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    77
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    78
    }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    79
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    80
    private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    81
    private static final int TIERED_STOP_AT_LEVEL = WHITE_BOX.getIntxVMFlag("TieredStopAtLevel").intValue();
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    82
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    83
    static boolean deoptimize(Method method, Object src_obj) throws Exception {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    84
        for (int i = 0; i < 10; i++) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    85
            method.invoke(null, src_obj);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    86
            if (!WHITE_BOX.isMethodCompiled(method)) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    87
                return true;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    88
            }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    89
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    90
        return false;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    91
    }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    92
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    93
    static public void main(String[] args) throws Exception {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    94
        if (!Platform.isServer() || Platform.isEmulatedClient()) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    95
            throw new Error("TESTBUG: Not server mode");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    96
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    97
        // Only execute if C2 is available
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    98
        if (TIERED_STOP_AT_LEVEL != CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
    99
            throw new RuntimeException("please enable C2");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   100
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   101
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   102
        Method method;
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   103
        if (WHITE_BOX.getUintxVMFlag("TypeProfileLevel") == 20) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   104
            method = TestTypeProfiling.class.getMethod("mRetTypeCheck", Object.class);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   105
        } else
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   106
        if (WHITE_BOX.getUintxVMFlag("TypeProfileLevel") == 200) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   107
            method = TestTypeProfiling.class.getMethod("mParamTypeCheck", Object.class);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   108
        } else {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   109
            throw new RuntimeException("please setup method return/params type profilation: -XX:TypeProfileLevel=020/200");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   110
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   111
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   112
        int[] src = new int[10];
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   113
        Object src_obj = new Object();
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   114
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   115
        // Warm up & make sure we collect type profiling
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   116
        for (int i = 0; i < 20000; i++) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   117
            mParamTypeCheck(src);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   118
            mRetTypeCheck(src);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   119
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   120
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   121
        // And make sure the method is compiled by C2
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   122
        WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   123
        if (!WHITE_BOX.isMethodCompiled(method)) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   124
            throw new RuntimeException(method.getName() + " is not compiled");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   125
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   126
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   127
        // should deoptimize for speculative type check
51073
34696f3aa22b 8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled
kvn
parents: 48183
diff changeset
   128
        // Intepreter will also add actual type check trap information into MDO
34696f3aa22b 8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled
kvn
parents: 48183
diff changeset
   129
        // when it throw ClassCastException
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   130
        if (!deoptimize(method, src_obj)) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   131
            throw new RuntimeException(method.getName() + " is not deoptimized");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   132
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   133
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   134
        // compile again
51073
34696f3aa22b 8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled
kvn
parents: 48183
diff changeset
   135
        // c2 will generate throw instead of uncommon trap because
34696f3aa22b 8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled
kvn
parents: 48183
diff changeset
   136
        // actual type check trap information is present in MDO
48183
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   137
        WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   138
        if (!WHITE_BOX.isMethodCompiled(method)) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   139
            throw new RuntimeException(method.getName() + " is not recompiled");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   140
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   141
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   142
        // this time new parameter type should not force deoptimization
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   143
        if (deoptimize(method, src_obj)) {
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   144
            throw new RuntimeException(method.getName() + " is deoptimized again");
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   145
        }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   146
    }
ee8e37f85775 8189439: Parameters type profiling is not performed from aarch64 interpreter
dpochepk
parents:
diff changeset
   147
}