8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and SharedStubToInterpTest.java

Reviewed-by: phh
Backport-of: 4a16d111b1
This commit is contained in:
Aleksey Shipilev
2024-03-11 09:18:50 +00:00
committed by Vitaly Provodin
parent 05d3ae28c0
commit def7862a3e
2 changed files with 7 additions and 4 deletions

View File

@@ -51,9 +51,10 @@ import jdk.test.lib.process.ProcessTools;
public class SharedStubToInterpTest {
private final static int ITERATIONS_TO_HEAT_LOOP = 20_000;
private static void runTest(String test) throws Exception {
private static void runTest(String compiler, String test) throws Exception {
String testClassName = SharedStubToInterpTest.class.getName() + "$" + test;
ArrayList<String> command = new ArrayList<String>();
command.add(compiler);
command.add("-XX:+UnlockDiagnosticVMOptions");
command.add("-Xbatch");
command.add("-XX:+PrintRelocations");
@@ -80,7 +81,7 @@ public class SharedStubToInterpTest {
public static void main(String[] args) throws Exception {
String[] methods = new String[] { "StaticMethodTest", "FinalClassTest", "FinalMethodTest"};
for (String methodName : methods) {
runTest(methodName);
runTest(args[0], methodName);
}
}

View File

@@ -28,6 +28,7 @@
* @bug 8280152
* @library /test/lib
*
* @requires vm.compiler2.enabled
* @requires vm.opt.TieredCompilation == null
* @requires os.arch=="aarch64" | os.arch=="riscv64"
* @requires vm.debug
@@ -46,9 +47,10 @@ import jdk.test.lib.process.ProcessTools;
public class SharedTrampolineTest {
private final static int ITERATIONS_TO_HEAT_LOOP = 20_000;
private static void runTest(String test) throws Exception {
private static void runTest(String compiler, String test) throws Exception {
String testClassName = SharedTrampolineTest.class.getName() + "$" + test;
ArrayList<String> command = new ArrayList<String>();
command.add(compiler);
command.add("-XX:+UnlockDiagnosticVMOptions");
command.add("-Xbatch");
command.add("-XX:+PrintRelocations");
@@ -72,7 +74,7 @@ public class SharedTrampolineTest {
public static void main(String[] args) throws Exception {
String[] tests = new String[] {"StaticMethodTest"};
for (String test : tests) {
runTest(test);
runTest(args[0], test);
}
}