RFR: Add humongous regions support to partial GC
Roman Kennke
rkennke at redhat.com
Thu Mar 16 14:48:54 UTC 2017
Am 16.03.2017 um 14:26 schrieb Aleksey Shipilev:
> On 03/16/2017 02:10 PM, Roman Kennke wrote:
>> This adds support for humongous regions as root regions in partial GC.
>>
>> I extended the ShenandoahHeapRegion::oop_iterate() to iterate over a
>> subset of a humongous object array (bounded by the region). This way we
>> avoid scanning the whole humongous object if the matrix only gives us a
>> single region as root.
>>
>> Tested using gc-bench/arrayfragger (which crashed before).
>>
>> http://cr.openjdk.java.net/~rkennke/partial-humongous/webrev.00/
> Um.
>
> *) I am blind! Who sets humongous_obj_array?
Ugh. I mixed up some stuff... I originally wanted to do it another way,
but now realize we don't even need to differentiate between obj and
primitive arrays. We can simply rewind to the head, call oop_iterate()
with a region, and let the implementation in oops sort it out. I.e. for
primitive arrays it would be a no-op (plus header), for oop arrays it
would do the right thing. This simplifies the patch.
> *) There is a weird disconnect: assume we call oop_iterate on a humongous
> region *head*. With primitive array, it would touch the array oop. With object
> array, it would only touch the array contents?
The oop_iterate() implementation *always* visits the header, no matter
which region it iterates over. This might be overkill, but is
conservative. For partial-GC it currently doesn't matter, as we don't
traverse through the header.
http://cr.openjdk.java.net/~rkennke/partial-humongous/webrev.01/
<http://cr.openjdk.java.net/%7Erkennke/partial-humongous/webrev.01/>
Roman
More information about the shenandoah-dev
mailing list