RFR: Heap region recycling should call explicit clear() and request zapping

Aleksey Shipilev shade at redhat.com
Thu Jun 1 09:57:45 UTC 2017


Hi,

Recent observation by chf about resetting top() [1] prompted me to find where we
actually do this. We apparently do that via CompactibleSpace::initialize ->
Space::initialize -> CompactibleSpace::clear. It feels more straightforward to
call that method explicitly.

Plus, request zapping of region space -- it will be enabled with
+ZapUnusedHeapArea, true in fastdebug, false in product. This should help to
diagnose bugs with referencing dead objects in recycled regions.

Fix:
 http://cr.openjdk.java.net/~shade/shenandoah/shr-clear-zap/webrev.01/

Checked -UseTLAB allocation pressure tests do not regress.

Testing: hotspot_gc_shenandoah

Thanks,
-Aleksey

[1]
http://cr.openjdk.java.net/~chf/heuristics/webrev.00/src/share/vm/gc/shenandoah/shenandoahHeapRegion.cpp.sdiff.html



More information about the shenandoah-dev mailing list