Integrated: 8314850: SharedRuntime::handle_wrong_method() gets called too often when resolving Continuation.enter

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Aug 24 18:11:42 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

This pull request has now been integrated.

Changeset: 8e4240c3
Author:    Patricio Chilano Mateo <pchilanomate at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8e4240c3167ff6c803f3391f70ef9cfa7f408085
Stats:     2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8314850: SharedRuntime::handle_wrong_method() gets called too often when resolving Continuation.enter

Reviewed-by: rpressler, aph

-------------

PR: https://git.openjdk.org/jdk/pull/15403


More information about the hotspot-dev mailing list