8341913: Support CDS heap dumping for Shenandoah and Epsilon
Reviewed-by: iklam, matsaave
This commit is contained in:
parent
c61d2c5a34
commit
28147dab07
@ -143,13 +143,18 @@ class HeapShared: AllStatic {
|
||||
friend class VerifySharedOopClosure;
|
||||
|
||||
public:
|
||||
// Can this VM write a heap region into the CDS archive? Currently only {G1|Parallel|Serial}+compressed_cp
|
||||
// Can this VM write a heap region into the CDS archive?
|
||||
static bool can_write() {
|
||||
CDS_JAVA_HEAP_ONLY(
|
||||
if (_disable_writing) {
|
||||
return false;
|
||||
}
|
||||
return (UseG1GC || UseParallelGC || UseSerialGC) && UseCompressedClassPointers;
|
||||
// Need compressed class pointers for heap region dump.
|
||||
if (!UseCompressedClassPointers) {
|
||||
return false;
|
||||
}
|
||||
// Almost all GCs support heap region dump, except ZGC (so far).
|
||||
return !UseZGC;
|
||||
)
|
||||
NOT_CDS_JAVA_HEAP(return false;)
|
||||
}
|
||||
|
@ -108,9 +108,12 @@ public class IncompatibleOptions {
|
||||
testDump(1, "-XX:+UseZGC", "-XX:-UseCompressedOops", null, false);
|
||||
}
|
||||
|
||||
// Dump heap objects with ParallelGC and SerialGC
|
||||
// Dump heap objects with Parallel, Serial, Shenandoah GC
|
||||
testDump(2, "-XX:+UseParallelGC", "", "", false);
|
||||
testDump(3, "-XX:+UseSerialGC", "", "", false);
|
||||
if (GC.Shenandoah.isSupported()) {
|
||||
testDump(4, "-XX:+UseShenandoahGC", "", "", false);
|
||||
}
|
||||
|
||||
// Explicitly archive with compressed oops, run without.
|
||||
testDump(5, "-XX:+UseG1GC", "-XX:+UseCompressedOops", null, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user