RFR: 8024176: [macosx] gc/metaspace/ClassMetaspaceSizeInJmapHeap.java failed since jdk8b105, hs25b47

Stefan Johansson stefan.johansson at oracle.com
Tue Sep 10 06:19:46 PDT 2013

Hi all,

Please review this really small fix for a test failure on Mac.


A GC jtreg test fails on Mac, and when looking at the failure one can 
see that the SA fails to find the type for an oop. It turns out the code 
for reading compressed klass pointers in the sa-agent on Mac used 
readCompOopAddress instead of readCompKlassAddress, this is wrong but 
has been hidden since compressed oops and compressed klasses has used 
the same base address. This was recently changed and now the SA agent 
will show this issue when attached to a JVM using compressed klasses.

The patch:

--- old/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java	2013-09-10 13:52:17.163078372 +0200
+++ new/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java	2013-09-10 13:52:17.079078971 +0200
@@ -81,7 +81,7 @@
      public Address getCompKlassAddressAt(long offset)
              throws UnalignedAddressException, UnmappedAddressException {
-        return debugger.readCompOopAddress(addr + offset);
+        return debugger.readCompKlassAddress(addr + offset);


More information about the hotspot-dev mailing list