Skip to content

Commit

Permalink
8236042: [TESTBUG] serviceability/sa/ClhsdbCDSCore.java fails with -X…
Browse files Browse the repository at this point in the history
…comp -XX:TieredStopAtLevel=1

Modify the test case to handle the scenario's of no printmdo's.

Reviewed-by: phh
Backport-of: 9376dd8
  • Loading branch information
zhengyu123 committed Nov 29, 2021
1 parent 7f963ca commit 2ea3786
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import java.util.regex.Matcher;
import jdk.internal.misc.Unsafe;
import java.util.Scanner;
import jdk.test.lib.Utils;
import jtreg.SkippedException;

class CrashApp {
Expand Down Expand Up @@ -164,7 +165,16 @@ public static void main(String[] args) throws Exception {
throw new SkippedException("The CDS archive is not mapped");
}

cmds = List.of("printmdo -a", "printall", "jstack -v");
List testJavaOpts = Arrays.asList(Utils.getTestJavaOpts());

if (testJavaOpts.contains("-Xcomp") && testJavaOpts.contains("-XX:TieredStopAtLevel=1")) {
// No MDOs are allocated in -XX:TieredStopAtLevel=1 + -Xcomp mode
// The reason is methods being compiled aren't hot enough
// Let's not call printmdo in such scenario
cmds = List.of("printall", "jstack -v");
} else {
cmds = List.of("printmdo -a", "printall", "jstack -v");
}

Map<String, List<String>> expStrMap = new HashMap<>();
Map<String, List<String>> unExpStrMap = new HashMap<>();
Expand Down

1 comment on commit 2ea3786

@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.