Skip to content

Commit 9376dd8

Browse files
author
Poonam Bajaj
committedJul 19, 2020
8236042: [TESTBUG] serviceability/sa/ClhsdbCDSCore.java fails with -Xcomp -XX:TieredStopAtLevel=1
Modify the test case to handle the scenario's of no printmdo's. Reviewed-by: cjplummer, kvn
1 parent 5d27067 commit 9376dd8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
 

‎test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import jdk.test.lib.process.OutputAnalyzer;
5353
import jdk.test.lib.process.ProcessTools;
5454
import jdk.test.lib.util.CoreUtils;
55+
import jdk.test.lib.Utils;
5556

5657
import jtreg.SkippedException;
5758

@@ -122,7 +123,16 @@ public static void main(String[] args) throws Exception {
122123
throw new SkippedException("The CDS archive is not mapped");
123124
}
124125

125-
cmds = List.of("printmdo -a", "printall", "jstack -v");
126+
List testJavaOpts = Arrays.asList(Utils.getTestJavaOpts());
127+
128+
if (testJavaOpts.contains("-Xcomp") && testJavaOpts.contains("-XX:TieredStopAtLevel=1")) {
129+
// No MDOs are allocated in -XX:TieredStopAtLevel=1 + -Xcomp mode
130+
// The reason is methods being compiled aren't hot enough
131+
// Let's not call printmdo in such scenario
132+
cmds = List.of("printall", "jstack -v");
133+
} else {
134+
cmds = List.of("printmdo -a", "printall", "jstack -v");
135+
}
126136

127137
Map<String, List<String>> expStrMap = new HashMap<>();
128138
Map<String, List<String>> unExpStrMap = new HashMap<>();

0 commit comments

Comments
 (0)
Please sign in to comment.