RFR (S) 8243238: Shenandoah: explicit GC request should wait for a complete GC cycle
Aleksey Shipilev
shade at redhat.com
Tue Apr 21 09:15:38 UTC 2020
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.
--
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list