RFR 8209624: [JVMCI] Invalidate nmethods instead of directly unloading them when the InstalledCode is dropped
Tom Rodriguez
tom.rodriguez at oracle.com
Fri Aug 17 18:52:25 UTC 2018
http://cr.openjdk.java.net/~never/8209624/webrev
https://bugs.openjdk.java.net/browse/JDK-8209624
When the lifetime of an InstalledCode instance is used to control the
lifetime of the corresponding nmethod it's possible for the nmethod
still have live activations when the nmethod is unloaded. This is
because the weak semantics of the installed_code means it isn't visited
in the nmethod::oops_do phase. We would have to sometimes maintain a
second strong reference which was visited in nmethod::oops_do to make
that work. Instead simply invalidate the nmethod and let the sweeper
unload the nmethod once it no longer has activations. Note that this
issue doesn't affect normal compiles requested the CompilerBroker since
the InstalledCode reference is weak in that case. The fix was tested
with a Truffle program that originally exposed the issue. mach5 runs
are in progress.
tom
More information about the hotspot-compiler-dev
mailing list