-Djdk.tracePinnedThreads
Cay Horstmann
cay.horstmann at gmail.com
Fri May 13 17:41:39 UTC 2022
I re-read the section on the jdk.tracePinnedThreads sysprop in
https://openjdk.java.net/jeps/425:
"The system property jdk.tracePinnedThreads triggers a stack trace when
a thread blocks while pinned."
I interpreted this to expect a stack trace whenever a thread blocks
while pinned.
Since that's not been my experience, I ran a simple program that spawned
ten virtual threads, each acquiring the same monitor. With
-Djdk.tracePinnedThreads=full, I got one stack trace and not ten. Of
course, one is enough, so I guessed this is by design. And then I
discovered java.lang.PinnedThreadPrinter.
It might be good to clarify the JEP. "Recently seen duplicates are not
printed."
Cheers,
Cay
--
Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com
More information about the loom-dev
mailing list