On Tue, 24 Nov 2026 02:12:02 GMT, David Holmes <[email protected]> wrote:

>> This is an update to the thread dump generated by 
>> HotSportDiagnosticMXBean.dumpThreads and the jcmd equivalent.
>> 
>> 1. The thread output is updated to include the identity string of the Thread 
>> object to make it easier link a Thread.join usage to the target thread.
>> 2. The parkBlocker is now set when parked in StructuredTaskScope.join parks 
>> to make it easier to find the STS in the thread dump.
>> 3. The thread CPU time is now included for platform threads when available.
>> 4. The JSON dump escapes forward slash between the module and class name in 
>> the stack traces. Escaping of this character is optional and dropped, as it 
>> was annoying.
>> 5. The escaping fails if a thread name contains a control character.
>> 
>> Testing: tier1-3
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpThreads.java line 671:
> 
>> 669: 
>> 670:             // Compiled native frames have no locals. If Object.wait0 
>> has been compiled
>> 671:             // then we may not have the object that the thread is 
>> waiting on.
> 
> Even when using compiled code we always know which object a monitor that is 
> being waited-upon belongs to.

Just re-reading your changes to 
[d244fce](https://github.com/openjdk/jdk/commit/d244fceff3e48fae405e4da1d055db55344c7c7a).
 If I read it correctly then detect_locks is no longer exclusively reliant on 
the frame locals, which may be why we needed to use WB in testWaitingThread to 
avoid intermittent failures.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33659#discussion_r4677409562

Reply via email to