Skip to content

Commit c8dd0b5

Browse files
committed
8256320: ZGC: Update zDebug to support UseCompressedClassPointers
Reviewed-by: pliden
1 parent 5973e91 commit c8dd0b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hotspot/share/gc/z/zDebug.gdb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ define zpo
5050
end
5151
printf "\t Page: %llu\n", ((uintptr_t)$obj & ZAddressOffsetMask) >> ZGranuleSizeShift
5252
x/16gx $obj
53-
printf "Mark: 0x%016llx\tKlass: %s\n", (uintptr_t)$obj->_mark, (char*)$obj->_metadata->_klass->_name->_body
53+
if (UseCompressedClassPointers)
54+
set $klass = (Klass*)(void*)((uintptr_t)CompressedKlassPointers::_narrow_klass._base +((uintptr_t)$obj->_metadata->_compressed_klass << CompressedKlassPointers::_narrow_klass._shift))
55+
else
56+
set $klass = $obj->_metadata->_klass
57+
end
58+
printf "Mark: 0x%016llx\tKlass: %s\n", (uintptr_t)$obj->_mark, (char*)$klass->_name->_body
5459
end
5560

5661
# Print heap page by page table index

0 commit comments

Comments
 (0)