spark

spark

95M Downloads

Support virtual threads

MartijnMuijsers opened this issue ยท 0 comments

commented

Description

It would be nice to be able to profile virtual threads in addition to platform threads.

Proposed Behaviour

Virtual threads would show up in addition to platform threads in the report.

Extra Details

Currently, the implementation to get thread info uses ThreadMXBean.dumpAllThreads, which does not support virtual threads.
However, virtual threads do support these methods when invoked directly upon them.
So therefore, I would suggest, instead of using the ThreadInfo instances, to use a custom ThreadInfo record that contains the information that we need, and pull it straight from the Thread instances.
That would be the change needed to make it compatible with virtual threads.