RFR: 8365057: Add support for java.util.concurrent lock information to Thread.dump_to_file [v2]

Alex Menkov amenkov at openjdk.org
Wed Sep 24 20:04:34 UTC 2025


On Wed, 24 Sep 2025 07:04:47 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/vm/ThreadSnapshot.java line 52:
>> 
>>> 50: 
>>> 51:     // the owner of the blockerObject when the object is park blocker and is AQS
>>> 52:     private Thread parkBlockerOwner;
>> 
>> Just wondering whether it makes sense to make the owner field part of the `ThreadBlocker` record?
>
> The parkBlocker is a property of the thread. When the parkBlocker is an AbstractOwnableSynchronizer then the owner is a property of that park blocker type. So yes, in modelling terms it would be more accurate. In practical terms it doesn't matter as it's all encapsulated but there is likely more work in this area so it would be better to get it right.

Fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27457#discussion_r2376925797


More information about the serviceability-dev mailing list