Skip to content
Permalink
Browse files
8236042: [TESTBUG] serviceability/sa/ClhsdbCDSCore.java fails with -X…
…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 2ea3786777d74621c8f774d6564e11043d70134f
Showing 1 changed file with 11 additions and 1 deletion.
@@ -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 {
@@ -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<>();

1 comment on commit 2ea3786

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 2ea3786 Nov 29, 2021

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.