RFR: Properly update roots in code cache

Aleksey Shipilev shade at redhat.com
Thu Jun 29 06:22:23 UTC 2017


On 06/29/2017 08:11 AM, Aleksey Shipilev wrote:
> On 06/28/2017 11:01 PM, Roman Kennke wrote:
>> With concurrent code cache evacuation, we now have to make sure we
>> properly update refs in the code cache at the start of full-gc. The
>> SCM::update_roots() only asserts that code cache roots point to
>> to-space, which is not correct under conc codecache evac. This patch
>> changes the code so that it properly updates code cache roots in full GC:
>>
>> http://cr.openjdk.java.net/~rkennke/fixfullupdatecodecache/webrev.00/
>> <http://cr.openjdk.java.net/%7Erkennke/fixfullupdatecodecache/webrev.00/>
> 
> Ah. Makes sense.
> 
> But the patch looks fragile for two reasons:
> 
>  a) The change is within the ASSERT block, meaning release is still broken
>  b) It relies on cancelled_concgc to detect we are in full GC path, which might
> get accidentally reset when we are in full GC already
> 
> I would rather split ShenandoahConcurrentMark::update_roots to normal and Full
> GC versions, and act accordingly. Or maybe keep it single, but accept the
> boolean flag, e.g.:

For example:
 http://cr.openjdk.java.net/~shade/shenandoah/codecache-conc-evac-fullgc/webrev.01/

Does it still fix the issue?

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list