RFR: 8287281: adjust guarantee in Handshake::execute for the case of target thread being current [v7]

Daniel D. Daugherty dcubed at openjdk.org
Tue Jun 21 21:41:00 UTC 2022


On Tue, 21 Jun 2022 19:22:43 GMT, Johan Sjölén <duke at openjdk.org> wrote:

>> Please review this PR for fixing JDK-8287281.
>> 
>> If a thread is handshake safe we immediately execute the closure, instead of going through the regular Handshake process. 
>> 
>> 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.
>> 
>> 
>> Passes tier1. Running tier2-5.
>
> Johan Sjölén has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Check only for target == current

Just to be clear:

@dholmes-ora wrote this:

Maybe we actually need to backtrack and restore an invariant that there is always a TLH even for the current thread and fix the JVMTI code that did things differently?


@sspitsyn wrote this:

This will make JVMTI code unnecessarily ugly in a couple of spots.
But I'm okay with that if keeping this invariant is important.
I can help with fixing JVMTI if needed.


The current version of the fix does NOT restore the invariant that there is always a TLH
even for the current thread. I'm (mostly) okay with this.

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

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


More information about the serviceability-dev mailing list