On Tue, 22 Sep 2026 10:44:45 GMT, Alan Bateman <[email protected]> wrote:

>> David Holmes has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Adjust test per Alan's request
>
> test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpThreads.java line 370:
> 
>> 368:             // then we may not have the object that the thread is 
>> waiting on.
>> 369:             Method wait0 = Object.class.getDeclaredMethod("wait0", 
>> long.class);
>> 370:             boolean expectWaitingOn = 
>> !WhiteBox.getWhiteBox().isMethodCompiled(wait0);
> 
> Now I'm wondering if expectWaitingOn is needed, and if we can checking 
> waitingOn unconditionally.

Yes it is still needed. You can have a compiled `wait0` frame and take the 
stack dump before the waiting-monitor has been set. So having a compiled frame 
no longer indicates you can't have the object, but we still don't always have 
it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32977#discussion_r4071287392

Reply via email to