Mercurial > hg > truffle
diff agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java @ 904:ef671fb22f73
6868051: (SA) FreeChunk support for compressed oops is broken
Reviewed-by: kvn, dcubed
author | never |
---|---|
date | Thu, 06 Aug 2009 12:24:41 -0700 |
parents | d1605aabd0a1 |
children | 89e0543e1737 |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java Thu Aug 06 09:37:26 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java Thu Aug 06 12:24:41 2009 -0700 @@ -176,19 +176,6 @@ for (; cur.lessThan(limit);) { Address klassOop = cur.getAddressAt(addressSize); - // FIXME: need to do a better job here. - // can I use bitMap here? - if (klassOop == null) { - //Find the object size using Printezis bits and skip over - System.err.println("Finding object size using Printezis bits and skipping over..."); - long size = collector().blockSizeUsingPrintezisBits(cur); - if (size == -1) { - System.err.println("Printezis bits not set..."); - break; - } - cur = cur.addOffsetTo(adjustObjectSizeInBytes(size)); - } - if (FreeChunk.indicatesFreeChunk(cur)) { if (! cur.equals(regionStart)) { res.add(new MemRegion(regionStart, cur)); @@ -200,12 +187,21 @@ } // note that fc.size() gives chunk size in heap words cur = cur.addOffsetTo(chunkSize * addressSize); - System.err.println("Free chunk in CMS heap, size="+chunkSize * addressSize); regionStart = cur; } else if (klassOop != null) { Oop obj = heap.newOop(cur.addOffsetToAsOopHandle(0)); long objectSize = obj.getObjectSize(); cur = cur.addOffsetTo(adjustObjectSizeInBytes(objectSize)); + } else { + // FIXME: need to do a better job here. + // can I use bitMap here? + //Find the object size using Printezis bits and skip over + long size = collector().blockSizeUsingPrintezisBits(cur); + if (size == -1) { + System.err.println("Printezis bits not set..."); + break; + } + cur = cur.addOffsetTo(adjustObjectSizeInBytes(size)); } } return res;