Skip to content

Commit a75d19d

Browse files
committed
8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and SharedStubToInterpTest.java
Reviewed-by: phh Backport-of: 4a16d111b16e556f904fb80075631b8439a9482e
1 parent c0b5fdf commit a75d19d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
public class SharedStubToInterpTest {
5252
private final static int ITERATIONS_TO_HEAT_LOOP = 20_000;
5353

54-
private static void runTest(String test) throws Exception {
54+
private static void runTest(String compiler, String test) throws Exception {
5555
String testClassName = SharedStubToInterpTest.class.getName() + "$" + test;
5656
ArrayList<String> command = new ArrayList<String>();
57+
command.add(compiler);
5758
command.add("-XX:+UnlockDiagnosticVMOptions");
5859
command.add("-Xbatch");
5960
command.add("-XX:+PrintRelocations");
@@ -80,7 +81,7 @@ private static void runTest(String test) throws Exception {
8081
public static void main(String[] args) throws Exception {
8182
String[] methods = new String[] { "StaticMethodTest", "FinalClassTest", "FinalMethodTest"};
8283
for (String methodName : methods) {
83-
runTest(methodName);
84+
runTest(args[0], methodName);
8485
}
8586
}
8687

test/hotspot/jtreg/compiler/sharedstubs/SharedTrampolineTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* @bug 8280152
2929
* @library /test/lib
3030
*
31+
* @requires vm.compiler2.enabled
3132
* @requires vm.opt.TieredCompilation == null
3233
* @requires os.arch=="aarch64" | os.arch=="riscv64"
3334
* @requires vm.debug
@@ -46,9 +47,10 @@
4647
public class SharedTrampolineTest {
4748
private final static int ITERATIONS_TO_HEAT_LOOP = 20_000;
4849

49-
private static void runTest(String test) throws Exception {
50+
private static void runTest(String compiler, String test) throws Exception {
5051
String testClassName = SharedTrampolineTest.class.getName() + "$" + test;
5152
ArrayList<String> command = new ArrayList<String>();
53+
command.add(compiler);
5254
command.add("-XX:+UnlockDiagnosticVMOptions");
5355
command.add("-Xbatch");
5456
command.add("-XX:+PrintRelocations");
@@ -72,7 +74,7 @@ private static void runTest(String test) throws Exception {
7274
public static void main(String[] args) throws Exception {
7375
String[] tests = new String[] {"StaticMethodTest"};
7476
for (String test : tests) {
75-
runTest(test);
77+
runTest(args[0], test);
7678
}
7779
}
7880

0 commit comments

Comments
 (0)