RFR: 8287281: adjust guarantee in Handshake::execute for the case of target thread being current [v2]
Johan Sjölén
duke at openjdk.java.net
Fri Jun 3 07:38:28 UTC 2022
> Please review this PR for fixing JDK-8287281.
>
> I chose a different solution than the one suggested. Looking at all callers of `Handshake::execute`, it seems that only one depends on `target == current`. The rest special case that by calling `is_handshake_safe_for` and `do_thread` directly. I converted the only instance of `Handshake::execute` with `target == current` to just directly call `do_thread`.
>
> Furthermore we now explicitly check for this case in `Handshake::execute` with an assert and document that this should not be done.
>
> Finally: Should `VirtualThreadGetThreadClosure` and its `do_thread()` body be inlined instead? We can do this in this PR, imho, but I'm hoping to get some input on this.
>
>
> Currently running tier1-5 to check if I'm missing something.
Johan Sjölén has updated the pull request incrementally with one additional commit since the last revision:
Call do_thread if handshaking with current thread as target
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8992/files
- new: https://git.openjdk.java.net/jdk/pull/8992/files/14bee58c..b7b4c086
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8992&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8992&range=00-01
Stats: 9 lines in 3 files changed: 2 ins; 5 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/8992.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8992/head:pull/8992
PR: https://git.openjdk.java.net/jdk/pull/8992
More information about the serviceability-dev
mailing list