RFR: Make weakref processing always use Executor

Roman Kennke rkennke at redhat.com
Thu Aug 9 14:38:56 UTC 2018


This is a solution to the problem that Zhengyu reported recently, where
the evac-oom-scope for VMThread would block evac-oom-scope for worker
threads in weak-ref-processing.

The idea is to always go through the executor, no matter if it's 1- or
N-threaded. The executor in turn calls the proxy, which then sets up the
correct scopes. In the 1-threaded case, the executor doesn't need to
fire up worker threads, but can call straight to the proxy in its
current thread (the VMThread). In other words, it preserves the current
behaviour, but moves setting up the scopes into the right places.

As a nice side-effect, this unclutters the code a little bit, and will
unclutter the code *significantly* as soon as WeakProcessor becomes
MT-capable (it's currently , in which case we can move it to the proxy
too and get rid of the mess that we currently need to drive it. I
suspect this might be welcome upstream.

http://cr.openjdk.java.net/~rkennke/weakrefs-1thread/webrev.00/

Testing: tier1_gc_shenandoah

Roman


More information about the shenandoah-dev mailing list