RFR: Concurrent partial should fix up roots only on cancel

Aleksey Shipilev shade at redhat.com
Tue Oct 10 13:04:39 UTC 2017


http://cr.openjdk.java.net/~shade/shenandoah/concpartial-fixroots-cancel/webrev.01/

Obvious when you stare into assert like:

#  assert(cancelled_concgc()) failed: Only after concurrent cycle failed

...because the condition in final_partial_collection is cunning:

 476   if (_has_work && ! _heap->cancelled_concgc()) {

...can call into "else" branch, and thus call heap->fixup_roots() without cancelled GC, when
_has_work=false. This will fail the assert inside fixup_roots(). We should just do that on
cancellation path only.

Testing: hotspot_gc_shenandoah

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list