On Tue, 24 Nov 2026 08:37:33 GMT, Alan Bateman <[email protected]> wrote:

>> test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpThreads.java line 
>> 671:
>> 
>>> 669: 
>>> 670:             // Compiled native frames have no locals. If Object.wait0 
>>> has been compiled
>>> 671:             // then we may not have the object that the thread is 
>>> waiting on.
>> 
>> Even when using compiled code we always know which object a monitor that is 
>> being waited-upon belongs to.
>
> Just re-reading your changes to 
> [d244fce](https://github.com/openjdk/jdk/commit/d244fceff3e48fae405e4da1d055db55344c7c7a).
>  If I read it correctly then detect_locks is no longer exclusively reliant on 
> the frame locals, which may be why we needed to use WB in testWaitingThread 
> to avoid intermittent failures.

I'm not sure what you are referring to regarding the test and WB. But the only 
time we need to use locals to get the target object is the small window where 
we are executing the native wait0() method (and so it appears on the top of the 
stack) but we have not yet called into the VM to starting the waiting process. 
I don't know if that native frame can be replaced with something else when 
compiled code is involved.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33659#discussion_r4689656149

Reply via email to