RFR: 8365192: post_meth_exit should be in vm state when calling get_jvmti_thread_state [v3]
Leonid Mesnik
lmesnik at openjdk.org
Fri Sep 5 16:08:13 UTC 2025
> This is the second attempt to fix method `post_meth_exit` to correctly set state and preserve result.
> The related fix here:
> https://github.com/openjdk/jdk/commit/b7b64bb6c800b45e32ff37b1b92b5927a3b3fb56
> Hope fix became clarere now.
>
> There 2 problems in this post_meth_exit:
> 1) The result is preserved only if `state->is_enabled(JVMTI_EVENT_METHOD_EXIT)` however transition in the JRT_BLOCK_END happens always. So there is a risk of loosing method results in the interp_only mode.
> 2) The method `get_jvmti_thread_state` should be called when thread is in vm state only.
>
> The fix adds `post_method_exit_transition` to have single exit point with oop restoration.
Leonid Mesnik has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- small improvements
- Merge branch 'master' of https://github.com/openjdk/jdk into 8365192-2
- comment
- comment is fixed.
- fix
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27112/files
- new: https://git.openjdk.org/jdk/pull/27112/files/77c9c7a3..0bd9c98d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27112&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27112&range=01-02
Stats: 997 lines in 48 files changed: 628 ins; 159 del; 210 mod
Patch: https://git.openjdk.org/jdk/pull/27112.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27112/head:pull/27112
PR: https://git.openjdk.org/jdk/pull/27112
More information about the hotspot-dev
mailing list