RFR: 8289284: jdk.tracePinnedThreads output confusing when pinned due to native frame

Alan Bateman alanb at openjdk.org
Tue Jun 28 14:19:13 UTC 2022


The system property jdk.tracePinnedThreads triggers a stack trace to be printed when a virtual thread parks while pinned. If a virtual thread is pinned due to a native frame there is a spurious " <== monitors:0" added to line for the native method.

A secondary issue is that there is no stack trace when there is Panama downcall as there isn't a native method in the stack trace. A future change may annotate the downcalls, for now the entire stack trace is printed (no filtering) so there is at least some output when pinned due to a call through native code

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

Commit messages:
 - Initial commit

Changes: https://git.openjdk.org/jdk/pull/9308/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9308&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8289284
  Stats: 114 lines in 4 files changed: 91 ins; 7 del; 16 mod
  Patch: https://git.openjdk.org/jdk/pull/9308.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9308/head:pull/9308

PR: https://git.openjdk.org/jdk/pull/9308


More information about the core-libs-dev mailing list