RFR: 8234662: Sweeper should keep current nmethod alive before yielding for ICStub refills
erik.osterlund at oracle.com
erik.osterlund at oracle.com
Fri Nov 22 15:03:52 UTC 2019
Hi,
Today, when GCs scan the stack, all nmethods roots found from threads
are nmethods that have gone through an nmethod entry barrier (in the
case of concurrent class unloading), except the super special sweeper
nmethod that is currently being processed when it runs out of ICStubs
and need to safepoint to refill ICStubs, which with the fantastic
safepoint coalescing optimization that we all know and love, can get
fused into a GC safepoint, which will find the sweeper nmethod and be
confused why it has not gone through an entry barrier before it yielded
to the safepoint like everyone else.
This causes some headache, and I would like to harmonize this better by
simply calling the nmethod entry barrier on that nmethod in the sweeper,
before yielding to the safepoint. Then there is no need to treat it as a
special case.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8234662
Webrev:
http://cr.openjdk.java.net/~eosterlund/8234662/webrev.00/
Thanks.
/Erik
More information about the hotspot-dev
mailing list