RFR: Fix mark-preserving in ShenandoahMarkCompact
Roman Kennke
rkennke at redhat.com
Fri May 10 09:36:32 UTC 2019
CI found a bug in Shenandoah with eliminate-fwdptr-word applied: specjvm
with +aggressive and +ShenandoahOOMDuringEvacALot would fail with
mismatched locks.
The reason is that the mark-preserving in mark-compact has a few issues:
- It lacked preserving marks for humongous objects
- It lacked BiasedLocking::preserve_marks() / restore_marks()
- It used must_be_preserved() instead of
must_be_preserved_for_promotion_failure(), the latter deals with biased
locks a little differently (and I think correctly for our purpose).
All those issues are addressed in the patch. I switched from self-made
mark-preserving to using gc/shared/preservedMarks.hpp which has the
additional advantage that I don't have to resort to locking to protect
the datastructures, and can instead use one stack per worker to record
and restore marks.
http://cr.openjdk.java.net/~rkennke/fixpreservemark/webrev.00/
Testing: hotspot_gc_shenandoah, the failing specjvm test multiple times
Ok?
Thanks,
Roman
More information about the shenandoah-dev
mailing list