RFR: Fix full-gc matrix updates

Roman Kennke rkennke at redhat.com
Fri Mar 17 21:16:01 UTC 2017


Am 17.03.2017 um 22:10 schrieb Roman Kennke:
> Am 17.03.2017 um 22:02 schrieb Roman Kennke:
>> When running the adjust-pointers pass in full-gc, we're also updating
>> the matrix. We're using the current oop* for from-region, and the new
>> location of the object for to-region. However, the from-object is also
>> going to move! We need to take this into account.
>>
>> It's fixed by computing the offset of the from-object and its new
>> location, and subtracting this from the from-pointer in the closure.
>>
>> I also snuck in two minor improvements:
>> - Remove some old redundant code (from last patch)
>> - use encode_store_heap_oop_not_null() instead of encode_store_heap_oop().
>>
>> http://cr.openjdk.java.net/~rkennke/partial-fixfullgc/webrev.00/
>> <http://cr.openjdk.java.net/%7Erkennke/partial-fixfullgc/webrev.00/>
>>
>> Ok?
>>
>> Roman
>>
>>
> Two little changes:
> - Use size_t instead of int, in case we need to address large memory.
> - Don't cast HeapWord* to oop, just to cast it back to HeapWord*. ;-)
>
> http://cr.openjdk.java.net/~rkennke/partial-fixfullgc/webrev.01/
> <http://cr.openjdk.java.net/%7Erkennke/partial-fixfullgc/webrev.01/>
Ok, another last change (sorry, it's almost weekend), as chf suggested
on IRC, let's use pointer_delta() instead of pointer subtraction.

http://cr.openjdk.java.net/~rkennke/partial-fixfullgc/webrev.02/
<http://cr.openjdk.java.net/%7Erkennke/partial-fixfullgc/webrev.02/>

Roman



More information about the shenandoah-dev mailing list