RFR: Check oop before pushing on Traversal queue

Aleksey Shipilev shade at redhat.com
Fri Aug 31 11:33:56 UTC 2018


sh/jdk is still broken. We have weird asserts that oops *polled* from the marking queue are in
collection set. Normal concurrent cycle asserts this *before* putting on the queue as well.
Traversal should do it too, and this would capture the interior_loc from where this oop was read.

diff -r 68c38ace31e8 src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.inline.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.inline.hpp  Fri Aug 31 12:53:46 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.inline.hpp  Fri Aug 31 13:25:24 2018 +0200
@@ -74,10 +74,13 @@
       if (src != NULL) {
         _matrix->set_connected(src, obj);
       }
     }

+    shenandoah_assert_not_forwarded(p, obj);
+    shenandoah_assert_not_in_cset_except(p, obj, _heap->cancelled_gc());
+
     if (mark_context->mark(obj)) {
       bool succeeded = queue->push(ShenandoahMarkTask(obj));
       assert(succeeded, "must succeed to push to task queue");

       if (STRING_DEDUP && ShenandoahStringDedup::is_candidate(obj) && !_heap->cancelled_gc()) {

Testing: tier3_gc_shenandoah (no new failures)

-Aleksey



More information about the shenandoah-dev mailing list