RFR 8015391: NPG: With -XX:+UseCompressedKlassPointers OOME due to exhausted metadat, a space could occur when metaspace is almost empty

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Thu Jun 20 14:28:59 PDT 2013


It looks good in general.

One minor comments:

src/share/vm/memory/metaspace.cpp

1868   if (chunk != NULL) {
*1869     while (chunk != NULL) {**
**1870       if (chunk != current_chunk()) {*
1871         result += chunk->free_word_size();
*1872       }*
1873       chunk = chunk->next();
1874     }
1875   }

The surrounding conditional block L1868, L1875 is not needed.
It was there before your fix though.


Thanks,
Serguei


On 6/20/13 9:26 AM, Coleen Phillimore wrote:
> Summary: Allocate medium chunks for class metaspace when class loader 
> has lots of classes
>
> I originally made class metaspace keep small chunks and not start 
> allocating from medium chunks, because I thought with only Klass 
> objects, small chunks is enough.  This test has a large set of class 
> loaders who have a lot of classes, so allocated thousands of small 
> chunks each.  Class loaders with that many classes should start 
> allocating from medium chunks, for class metaspace.
>
> I also increased the ClassMediumChunk size to 4k and measured a lot 
> less fragmentation waste than 1K or 2K for this test.  Lastly, the 
> AppClassLoader instance should have as large of an initial metaspace 
> as the bootclass loader.
>
> Tested with vm.quick.testlist and the failing test.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/8015391/
> bug link at http://bugs.sun.com/view_bug.do?bug_id=8015391
> local bug link https://jbs.oracle.com/bugs/browse/JDK-8015391
>
> Thanks,
> Coleen
>



More information about the hotspot-dev mailing list