RFR: Traversal GC: query garbage counter only for regular regions

Aleksey Shipilev shade at redhat.com
Mon Feb 19 15:04:48 UTC 2018


On 02/19/2018 03:40 PM, Roman Kennke wrote:
> I found this in my patch queue from before FOSDEM. Back then I tripped
> an assert about miscounted liveness data, which was caused by querying
> garbage() on a humongous region. Re-ordering the calls fixes it. I
> also made the assert a little weaker to not fire on humongous regions.
> 
> http://cr.openjdk.java.net/~rkennke/trav-humongous-live-data/webrev.00/

*) Do you really need the assert change? It basically protects from size_t underflow in the line below.

*) These parentheses look weird:

1344       if ((r->is_regular() && r->used() > 0)) {

did you mean this?

1344       if (r->is_regular() && (r->used() > 0)) {

Otherwise looks good.

-Aleksey



More information about the shenandoah-dev mailing list