RFR: 8371380: [LOOM] The debug agent should avoid enabling VIRTUAL_THREAD_START/END events when possible
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Nov 25 09:13:57 UTC 2025
On Tue, 25 Nov 2025 02:25:02 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> Don't enabled VIRTUAL_THREAD_START/END events unless absolutely necessary. Solves performance issues when trying to debug apps that create a lot of virtual threads. Details in first comment.
>
> With these changes the Skynet benchmark no longer shows any slowdown when launching with debugging enabled or when attaching the debugger.
>
> Tested with all tier2, tier3, tier5, and tier6 CI testing (with filters to only run svc tests).
src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c line 1444:
> 1442: } else {
> 1443: error = threadControl_setEventMode(JVMTI_DISABLE, EI_VIRTUAL_THREAD_END, thread);
> 1444: }
Q: Why is the `THREAD_START` event disabled globally (for all threads) but the `THREAD_END` event is disabled for specific thread?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28485#discussion_r2559181531
More information about the serviceability-dev
mailing list