RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps [v4]
David Holmes
dholmes at openjdk.org
Thu May 29 06:01:02 UTC 2025
On Thu, 29 May 2025 03:26:49 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> This is first (hotspot) part of the update for `HotSpotDiagnosticMXBean.dumpThreads` and `jcmd Thread.dump_to_file` to include lock information in thread dumps (JDK-8356870).
>> The update has been split into parts to simplify reviewing.
>> The fix contains an implementation of `jdk.internal.vm.ThreadSnapshot` class to gather required information about a thread.
>> Second (dependent) part includes changes in `HotSpotDiagnosticMXBean.dumpThreads`/`jcmd Thread.dump_to_file`, spec updates and tests for the functionality.
>>
>> Testing: new `HotSpotDiagnosticMXBean.dumpThreads`/`jcmd Thread.dump_to_file` functionality was tested in loom repo;
>> sanity tier1 (this fix only)
>
> Alex Menkov has updated the pull request incrementally with five additional commits since the last revision:
>
> - removed retry_handshake logic
> - removed AbstractOwnableSynchronizer.exclusiveOwnerThread support
> - cleanup
> - renamed java_thread, thread_h
> - fixed minimal and zero
src/hotspot/share/services/threadService.cpp line 1145:
> 1143: int _depth;
> 1144: Type _type;
> 1145: // synchronization object (when type == LOCKED) ot its klass (type == ELIMINATED)
Suggestion:
// synchronization object (when type == LOCKED) or its klass (type == ELIMINATED)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2113263697
More information about the hotspot-dev
mailing list