Request for review (m) - 8008508: CMS does not correctly reduce heap size after a Full GC
Jon Masamitsu
jon.masamitsu at oracle.com
Tue Feb 26 23:30:54 UTC 2013
On 2/25/2013 3:48 PM, John Cuthbertson wrote:
> Hi Jon,
>
> This looks good to me except you have left some instrumentation in
> generation.cpp:
>
>> 597 // We have two shrinking computations, take the largest
>> 598 shrink_bytes = MAX2(shrink_bytes, expansion_for_promotion);
>> 599 assert(shrink_bytes <= max_shrink_bytes, "invalid shrink
>> size");
>> 600 if (true || PrintGC && Verbose) {
Oops. Fixed.
>> 601 gclog_or_tty->print_cr(" "
>> 602 " aggressive shrinking:"
>> 603 " _capacity_at_prologue: %.1fK"
>> 604 " capacity_after_gc: %.1fK"
>> 605 " expansion_for_promotion: %.1fK"
>> 606 " shrink_bytes: %.1fK",
>> 607 capacity_after_gc / (double) K,
>> 608 _capacity_at_prologue / (double) K,
>> 609 expansion_for_promotion / (double) K,
>> 610 shrink_bytes / (double) K);
>> 611 }
>
> and I don't think you need:
>
>> 1083
>> 1084 TenuredGeneration* as_TenuredGeneration() { return
>> (TenuredGeneration*) this; }
>> 1085
> in ConcurrentMarkSweepGeneration.hpp anymore.
Right again. Fixed.
Jon
>
> JohnC
>
> On 2/19/2013 9:29 PM, Jon Masamitsu wrote:
>> 8008508: CMS does not correctly reduce heap size after a Full GC
>>
>> http://cr.openjdk.java.net/~jmasa/8008508/webrev.00/
>>
>> The CMS generation has a CompactibleFreeListSpace that describes
>> its part of the heap space. The free space of a
>> CompactibleFreeListSpace
>> is maintained in freelists and it is cannot shrink in the simple
>> the ContiguousSpaces shrink. The exception is after a full GC when
>> all the free space in the CMS geneartion is in a single chunk at the
>> end of the CompactibleFreeListSpace. This change treats the free space
>> in the CMS generation like a ContiguousSpace and shrinks it using the
>> same policy as many of the other generations.
>>
>> Move the method compute_new_size() from the TenuredGeneration into
>> the CardGeneration when it can be shared with the
>> ConcMarkSweepGeneration.
>> Some associated variables are also moved.
>>
>> Added a compute_new_space_free_list() and associated methods for
>> managing the size of the CompactibleFreeListSpace in the CMS generation.
>> The method shrink_free_list_by() still does not shrink the CMS
>> generation.
>>
>> Thanks.
>
More information about the hotspot-gc-dev
mailing list