jdb creates a ThreadStartRequest and ThreadDeathRequest so it can track all created threads. It creates them with the SUSPEND_ALL policy. This is unnecessary since jdb always immediately resumes all threads after doing the thread bookkeeping. There is no interaction with the jdb user like there would be with something like a Breakpoint event, and therefore no reason to suspend.
I was debugging an app that does nothing except create threads and allow them to quickly exit. Changing the policy to SUSPEND_NONE sped up the execution of the app by about 100x (that's 100 times faster, not 100%).
I was debugging an app that does nothing except create threads and allow them to quickly exit. Changing the policy to SUSPEND_NONE sped up the execution of the app by about 100x (that's 100 times faster, not 100%).
- relates to
-
JDK-8301798 [BACKOUT] jdb ThreadStartRequest and ThreadDeathRequest should use SUSPEND_NONE instead of SUSPEND_ALL
- Resolved
-
JDK-8301644 com/sun/jdi/JdbStopThreadTest.java fails after JDK-8300811
- Closed
-
JDK-8301695 com/sun/jdi/JdbOptions.java failed with "RuntimeException: waitForPrompt timed out after 240 seconds"
- Closed
-
JDK-8301735 Test com/sun/jdi/RedefineG.java timing out on macos
- Closed
-
JDK-8301795 com/sun/jdi/RedefineIntConstantToLong.java failed with "waitForPrompt timed out"
- Closed
(2 links to)