On Tue, 25 Nov 2025 02:25:02 GMT, Chris Plummer <[email protected]> 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

Reply via email to