RFR: ThreadSnapshot: redesign and cleanup [v3]

Alex Menkov amenkov at openjdk.org
Sat May 17 00:24:21 UTC 2025


On Fri, 16 May 2025 18:32:59 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> src/hotspot/share/classfile/javaClasses.cpp line 1974:
>> 
>>> 1972:         oop park_blocker = java_lang_Thread::park_blocker(_java_thread());
>>> 1973:         if (park_blocker != nullptr) {
>>> 1974:           _blocker = LockInfo(LockInfo::PARKING_TO_WAIT, OopHandle(Universe::vm_global(), park_blocker));
>> 
>> At some point then maybe this could move out of detect_locks as it's nothing to do with the javaVFrame, instead parkBlocker is just a property of a thread and PARKING_TO_WAIT can be PARK_BLOCKER.
>
> Added to TODO list

Fixed in update commit

>> src/java.base/share/classes/jdk/internal/vm/ThreadSnapshot.java line 37:
>> 
>>> 35:     private static final ThreadLock[] EMPTY_LOCKS = new ThreadLock[0];
>>> 36: 
>>> 37:     // filled by VM
>> 
>> At some point we need to add carrierThread to also be captured when the target thread is a mounted virtual thread.
>
> Added to TODO list

Fixed in update commit

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

PR Review Comment: https://git.openjdk.org/loom/pull/220#discussion_r2093789366
PR Review Comment: https://git.openjdk.org/loom/pull/220#discussion_r2093789339


More information about the loom-dev mailing list