RFR (S) 8243238: Shenandoah: explicit GC request should wait for a complete GC cycle

Roman Kennke rkennke at redhat.com
Tue Apr 21 09:17:39 UTC 2020



Am 21.04.20 um 11:15 schrieb Aleksey Shipilev:
> On 4/21/20 10:09 AM, Roman Kennke wrote:
>> Why do you call reset_gc_id() in the ctor instead of initializing it to
>> 0 in the regular initializer?
> 
> I prefer to initialize atomic value with atomic op. (ShenandoahSharedFlags do the same.) Don't want
> to chase initialization bugs on these paths.
> 
>> Don't we have a global GC ID counter already, somewhere?
> 
> We do, in shared GCId. But, it is not atomic. Also, it is only available when GC is running, so it
> would return awkward stuff on out-of-cycle GC requests. Therefore, I thought it is safer to do our own.
> 

Ok, that makes sense. Go!

Roman



More information about the shenandoah-dev mailing list