mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-16 08:29:34 +00:00
8134030: test/serviceability/dcmd/gc/HeapDumpTest fails to verify the dump
Reviewed-by: dholmes
This commit is contained in:
parent
3805097595
commit
96ec5c84ba
@ -897,8 +897,10 @@ void DumperSupport::dump_instance(DumpWriter* writer, oop o) {
|
||||
void DumperSupport::dump_class_and_array_classes(DumpWriter* writer, Klass* k) {
|
||||
InstanceKlass* ik = InstanceKlass::cast(k);
|
||||
|
||||
// Ignore the class if it hasn't been initialized yet
|
||||
if (!ik->is_linked()) {
|
||||
// We can safepoint and do a heap dump at a point where we have a Klass,
|
||||
// but no java mirror class has been setup for it. So we need to check
|
||||
// that the class is at least loaded, to avoid crash from a null mirror.
|
||||
if (!ik->is_loaded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@ public class HeapDumpTest {
|
||||
String cmd = "GC.heap_dump " + heapDumpArgs + " " + dump.getAbsolutePath();
|
||||
executor.execute(cmd);
|
||||
|
||||
verifyHeapDump(dump);
|
||||
dump.delete();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user