RFR: 8267972: Inline cache cleaning is not monotonic
Erik Österlund
eosterlund at openjdk.java.net
Mon Jun 7 09:49:06 UTC 2021
On Fri, 4 Jun 2021 13:01:33 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> When inline cache cleaning of a concurrent code cache unloading cycle happens concurrent to a mutator installing values into an inline cache, the mutator has to be careful not to undo the cleaning performed by a GC thread. Otherwise the GC can clean an inline cache that points at an is_unloading() nmethod, and then the mutator installs a reference back to an is_unloading() nmethod. Then despite the GC having traversed the code cache cleaning up inline caches, we can not be certain that there are no longer inline caches pointing at is_unloading() nmethods.
> The fix is relatively simple: when computing the entry for inline caches and static calls, we today check that the target nmethod is_in_use(). We have to check that it is_in_use() && !is_unloading(), to install such code pointers, for completeness.
> Testing: tier1-7 tests
Thanks for the review Vladimir K.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4361
More information about the hotspot-compiler-dev
mailing list