mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
8059559: SIGSEGV at CodeHeap::allocate(unsigned int, bool)
Create the non-profiled code heap if TieredStopAtLevel=0 is set because we compile method handle intrinsics. Reviewed-by: kvn
This commit is contained in:
parent
c39454ae56
commit
4c1c76ae4f
2 changed files with 16 additions and 8 deletions
|
@ -38,22 +38,26 @@ public class CheckSegmentedCodeCache {
|
|||
|
||||
private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled) throws Exception {
|
||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||
out.shouldHaveExitValue(0);
|
||||
if (enabled) {
|
||||
try {
|
||||
// Non-nmethod code heap should be always available with the segmented code cache
|
||||
out.shouldContain(NON_METHOD);
|
||||
} catch (RuntimeException e) {
|
||||
// TieredCompilation is disabled in a client VM
|
||||
out.shouldContain("TieredCompilation is disabled in this release.");
|
||||
// Check if TieredCompilation is disabled (in a client VM)
|
||||
if(!out.getOutput().contains("TieredCompilation is disabled in this release.")) {
|
||||
// Code cache is not segmented
|
||||
throw new RuntimeException("No code cache segmentation.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.shouldNotContain(NON_METHOD);
|
||||
}
|
||||
out.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
private static void verifyCodeHeapNotExists(ProcessBuilder pb, String... heapNames) throws Exception {
|
||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||
out.shouldHaveExitValue(0);
|
||||
for (String name : heapNames) {
|
||||
out.shouldNotContain(name);
|
||||
}
|
||||
|
@ -86,6 +90,10 @@ public class CheckSegmentedCodeCache {
|
|||
"-XX:ReservedCodeCacheSize=240m",
|
||||
"-XX:+PrintCodeCache", "-version");
|
||||
verifySegmentedCodeCache(pb, true);
|
||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+TieredCompilation",
|
||||
"-XX:ReservedCodeCacheSize=400m",
|
||||
"-XX:+PrintCodeCache", "-version");
|
||||
verifySegmentedCodeCache(pb, true);
|
||||
|
||||
// Always enabled if SegmentedCodeCache is set
|
||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||
|
@ -100,12 +108,13 @@ public class CheckSegmentedCodeCache {
|
|||
"-Xint",
|
||||
"-XX:+PrintCodeCache", "-version");
|
||||
verifyCodeHeapNotExists(pb, PROFILED, NON_PROFILED);
|
||||
|
||||
// If we stop compilation at CompLevel_none or CompLevel_simple we
|
||||
// don't need a profiled code heap.
|
||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||
"-XX:TieredStopAtLevel=0",
|
||||
"-XX:+PrintCodeCache", "-version");
|
||||
verifyCodeHeapNotExists(pb, PROFILED, NON_PROFILED);
|
||||
|
||||
// If we stop compilation at CompLevel_simple
|
||||
verifyCodeHeapNotExists(pb, PROFILED);
|
||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||
"-XX:TieredStopAtLevel=1",
|
||||
"-XX:+PrintCodeCache", "-version");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue