RFR: Use BSC2::enqueue_useful_gc_barrier() to enqueue Shenandoah barriers

Roman Kennke rkennke at redhat.com
Thu Sep 13 19:34:31 UTC 2018


This moves the enqueuing of Shenandoah barrier (users) to go via the
BarrierSetC2::enqueue_useful_gc_barrier() interface.

One little gotcha was that the interface takes the worklist, and we want
to all all *users* of the node, via
PhaseIterGVN::add_users_to_worklist(). I changed the interface (to be
upstreamed) to take the PhaseIterGVN* instead of the actual worklist.
This seems more flexible.

Close to the code that I touched I see:

            } else if (dead->Opcode() == Op_ShenandoahWBMemProj) {
              assert(i == 0 && in->Opcode() ==
Op_ShenandoahWriteBarrier, "broken graph");
              _worklist.push(in);
            }

I wonder if this can be handled in SBSC2::enqueue_useful_gc_barrier() as
well. Problem is we don't get to see 'dead' but only the actual WB. Can
we enqueue this wholesale, without checking for 'dead ==
ShenandoahWBMemProj' ? Or can we use it somehow else?

I left it alone for now.

http://cr.openjdk.java.net/~rkennke/enqueue-barriers/webrev.00/

Testing: tier3_gc_shenandoah

Ok?



More information about the shenandoah-dev mailing list