RFR: 8314850: SharedRuntime::handle_wrong_method() gets called too often when resolving Continuation.enter
Andrew Haley
aph at openjdk.org
Wed Aug 23 15:20:20 UTC 2023
On Wed, 23 Aug 2023 14:25:12 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
> Please review the following fix. The check in SharedRuntime::reresolve_call_site() "caller.is_compiled_frame() && !caller.is_deoptimized_frame()" fails when caller is Continuation.enterSpecial because it is a native method. This means that if the static callsite to Continuation.enter was patched to point to an nmethod and then the nmethod was marked non-entrant we will always call SharedRuntime::handle_wrong_method() thereafter when resolving Continuation.enter because the callsite will never be reset back to the clean state. Thanks to @kuksenko for all the performance analysis while debugging this.
> I tested the patch by running the test included in the original report (loom-dev mailing list) and verifying the issue is fixed. I also run mach5 tiers1-3 for sanity testing and will run all the upper tiers too.
>
> Thanks,
> Patricio
Marked as reviewed by aph (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/15403#pullrequestreview-1591852172
More information about the hotspot-dev
mailing list