On Wed, 23 Oct 2024 09:53:44 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> The problem is that within that window we don't have access to the virtual 
>> thread's tid. The current thread has already been changed and we haven't yet 
>> set the lock id back. Since this will be a rare corner case maybe we can 
>> just print tid unavailable if we hit it. We could also add a boolean to 
>> setCurrentThread to indicate we don't want to change the lock_id, but not 
>> sure it's worth it.
>
> It should be rare and once we make further progress on timers then the use of 
> temporary transitions will mostly disappear. I think the main thing for the 
> thread dump is not to print a confusing "Carrying virtual thread" with the 
> tid of the carrier. This came up in 
> [pull/19482](https://github.com/openjdk/jdk/pull/19482) when the thread was 
> extended.

Pushed a fix to avoid printing the virtual thread tid if we hit that case.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1814186777

Reply via email to