Skip to content

Commit

Permalink
8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and S…
Browse files Browse the repository at this point in the history
…haredStubToInterpTest.java

Reviewed-by: phh
Backport-of: 4a16d111b16e556f904fb80075631b8439a9482e
  • Loading branch information
shipilev committed Mar 11, 2024
1 parent c0b5fdf commit a75d19d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@
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");
Expand All @@ -80,7 +81,7 @@ private static void runTest(String test) throws Exception {
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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,9 +47,10 @@
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");
Expand All @@ -72,7 +74,7 @@ private static void runTest(String test) throws Exception {
public static void main(String[] args) throws Exception {
String[] tests = new String[] {"StaticMethodTest"};
for (String test : tests) {
runTest(test);
runTest(args[0], test);
}
}

Expand Down

1 comment on commit a75d19d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.