RFR (XS): JDK-805896 metaspace/shrink_grow/CompressedClassSpaceSize fails with OOM: Compressed class space

Kim Barrett kim.barrett at oracle.com
Thu May 14 21:26:04 UTC 2015

On May 14, 2015, at 3:45 PM, Joseph Provino <joseph.provino at oracle.com> wrote:
> Can I get reviews for the following fix?  The problem is that an attempt is made
> to allocate a medium chunk for class metaspace but there are no medium chunks available.
> However there are many small chunks available.
> If the allocation request size fits in a small chunk, the fix is to try allocating a small
> chunk after failing to allocate a medium chunk.
> Changes are in one file.
> http://cr.openjdk.java.net/~jprovino/8058967/webrev.00
> https://bugs.openjdk.java.net/browse/JDK-8058967
> Passed JPRT
> Aurora ad-hoc test of vm.parallel_class_loading:
> http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=882047.VMSQE.adhoc.JPRT-1
> thanks.
> joe

The proposed change violates the policy described in
calc_chunk_size().  Either that policy is important and prevents this
change, or the policy description needs to be updated (and an
explanation of why that's ok needs to be provided).

I wonder if the real problem might be that the test is making
unreasonable assumptions, and needs to be changed.

2090   if (next == NULL && word_size + Metachunk::overhead() <= small_chunk_size() &&
2091     grow_chunks_by_words == medium_chunk_size()) {

I think line breaks between expressions would make that test a lot
easier to read.  And indentation should be based on the open-paren
rather than the if; as written, grow_chunks_by_words is indented
appropriately for the body of the if.

More information about the hotspot-gc-dev mailing list