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:32 UTC 2025
On Wed, 24 Sep 2025 06:30:05 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> feedback
>
> src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java line 208:
>
>> 206: Object parkBlocker = snapshot.parkBlocker();
>> 207: if (parkBlocker != null) {
>> 208: String suffix = (snapshot.parkBlockerOwner() != null)
>
> This was `String suffix = (snapshot.parkBlockerOwner() instanceof Thread owner)` in the original prototype. It avoids the null check and allows L209 to use owner.threadId(). I think I'd prefer it here as it makes it consistent with the other uses of pattern matching with instanceof in this code.
Fixed (and for json version too)
> test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpThreads.java line 695:
>
>> 693: }
>> 694:
>> 695: /**
>
> In the contains methods, the comment has "contain the given text", it should "containing the given text". (this was spotted when adding the find method).
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27457#discussion_r2376925109
PR Review Comment: https://git.openjdk.org/jdk/pull/27457#discussion_r2376926531
More information about the serviceability-dev
mailing list