JFR integration
Alan Bateman
Alan.Bateman at oracle.com
Wed Mar 22 16:11:44 UTC 2023
On 22/03/2023 15:25, Jonathan Ross wrote:
> Hello all,
>
> Apologies if this has been discussed before, I am new to this list...
>
> I have been experimenting with virtual threads in JDK 20, and took a
> look at some flight recordings. It would appear that events recorded
> on virtual threads have empty 'Event Thread' fields, and that carrier
> threads don't have names.
>
> My copy of jmc (Azul Mission Control 8.3.0) currently renders all
> virtual thread events on a single nameless thread in the thread view,
> which, as it hopefully goes without saying, makes it much harder to
> analyze program flow than when using a ThreadPoolExecutor or a
> ForkJoinPool.
>
> Is there a reason for the blanks? Or is Mission Control at fault?
>
Virtual threads don't have names by default. Frameworks/libraries that
create virtual threads can set names where it make sense and is useful,
say client info of the connection that the virtual thread is handling.
I don't know if it possible to get JMC to show other fields but the
events in the recording have the thread ID, name, and a few other fields
of the thread that committed the event.
Your comment on "a single nameless thread" is surprising as thread names
have never been unique.
-Alan
More information about the loom-dev
mailing list