RFR: Traversal: Initialize extra liveness arrays when conc-threads > par-threads

Aleksey Shipilev shade at redhat.com
Thu Feb 22 10:26:32 UTC 2018


On 02/22/2018 11:07 AM, Roman Kennke wrote:
> Yesterday, Zhengyu discovered why sometimes we get liveness counters
> off when running with conc-threads > par-threads. We only initialize
> liveness arrays in init-traversal, and we do this in the workers, so
> only the active workers get their liveness array initialized. Duh.
> 
> This fix checks in conc-traversal worker if the worker_id is >= the
> last number of stw workers used, and if so, initializes its own
> liveness array.
> 
> Test: hotspot_gc_shenandoah
> 
> http://cr.openjdk.java.net/~rkennke/init-extra-liveness/webrev.00/

While this looks moderately okay, maybe we shouldn't cut through like that, and instead initialize
liveness for max_workers somewhere during init-traversal? You can fill the entire _liveness_local in
bulk then too.

-Aleksey



More information about the shenandoah-dev mailing list