Request for review: 6976350 G1: deal with fragmentation while copying objects during GC
Jon Masamitsu
jon.masamitsu at oracle.com
Fri Feb 1 22:58:53 UTC 2013
http://cr.openjdk.java.net/~tamao/6976350/webrev.00/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.frames.html
line 4386
Please add the brackets for the outer for loop. I'm not used to seeing it
without the brackets even though they are not strictly needed.
http://cr.openjdk.java.net/~tamao/6976350/webrev.00/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp.frames.html
line 1821 same comment about brackets for for-statement.
line 1869
You always retire alloc_buf1. Did you consider retiring the buffer that
has the
less words_remaining?
line 1762
Can you make _alloc_buffers two dimensional? Then you wouldn't need the
buf_idx() method.
GCAllocPriority is an enum but you use them as integers in the for loops.
Can you make the for loop index variable an enum GCAllocPriority?
Jon
On 1/28/2013 12:21 PM, Tao Mao wrote:
> 6976350 G1: deal with fragmentation while copying objects during GC
> https://jbs.oracle.com/bugs/browse/JDK-6976350
>
> webrev:
> http://cr.openjdk.java.net/~tamao/6976350/webrev.00/
>
> changeset:
> Basically, we want to reuse more of par-allocation buffers instead of
> retiring it immediately when it encounters an object larger than its
> remaining part.
>
> (1) instead of previously using one allocation buffer per GC purpose,
> we use N(=2) buffers per GC purpose and modify the corresponding code.
> The changeset would easily scale up to whatever N (though Tony
> Printezis suggests 2, or 3 may be good enough)
>
> *(2) Two places of cleanup: allocate_during_gc_slow() is removed due
> to its never being called.
> access modifier (public)
> before trim_queue() is redundant.
>
>
More information about the hotspot-gc-dev
mailing list