Request for review - 8022817: CMS should not shrink if compaction was not done
jon.masamitsu at oracle.com
Wed Aug 14 20:55:47 PDT 2013
On 8/14/2013 3:28 AM, Mikael Gerdin wrote:
> On 2013-08-12 21:09, Jon Masamitsu wrote:
>> 8022817: CMS should not shrink if compaction was not done
>> If UseCMSCompactAtFullCollection is turned off, a full GC that is done
>> in the foreground but does
>> not compact should not shrink the generation. In that case a mark-sweep
>> was done so the free space
>> is maintained in freelists (not as a contiguous area at the end of the
>> generation) and shrinking for
>> freelists is not implemented.
> I would prefer if the !did_compact() check was pulled up to
> ConcurrentMarkSweepGeneration::shrink instead.
> My reasoning is that shrink() already does a check for size > 0 before
> calling shrink_by() to do the actual work.
> I think it would be clearer if shrink() did the checks and shrink_by()
> did the unconditional shrinking.
I like it. I made the change.
More information about the hotspot-gc-dev