RFR: Don't re-enter evac-scope in worker-threads when hitting a write-barrier
Roman Kennke
rkennke at redhat.com
Fri Aug 10 16:56:48 UTC 2018
An early adopter has run into a bug where a GC worker thread would
attempt to re-enter the evac-scope because it hits a write barrier. That
path was not trivial to clean up (it went through threads-root-scanning,
and then attempted to clean up monitors, which would touch mark word and
thus does a write-barrier.
The solution that I'm proposing is to always check for worker-thread in
the usual runtime write-barrier path, and branch to write_barrier_gc()
when it's a worker thread, which does not use the evac-scope, and
asserts that it already has entered the scope.
The slow-paths coming from (potentially hot) c2, c1 and interpreter WBs
unconditionally use the mutator version.
http://cr.openjdk.java.net/~rkennke/wb-evac-scopes/webrev.00/
Testing: tier3_gc_shenandoah (ongoing, will only push when ok)
WDYT?
Roman
More information about the shenandoah-dev
mailing list