On Wed, 18 Dec 2024 04:24:51 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Robert Toyonaga has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   updates tests and remove old class
>
> src/hotspot/os/windows/os_windows.cpp line 3624:
> 
>> 3622: #ifdef ASSERT
>> 3623:       fileStream fs(stdout);
>> 3624:       os::print_memory_mappings((char*)start, bytes, &fs);
> 
> Why was this change made? tty could be stdout or stderr depending on VM flag 
> settings.

This change was decided on in the original PR after it was discovered that 
calling 
[os::print_memory_mappings](https://github.com/openjdk/jdk/blob/jdk-25%2B2/src/hotspot/os/windows/os_windows.cpp#L3623)
 from the windows implementation of `os::pd_release_memory` causes a rank 
conflict between `tty_lock` and `NmtVirtualMemory_lock`. This is getting called 
from `os::release_memory` [after we've already acquired the lock for 
NMT](https://github.com/openjdk/jdk/blob/jdk-25%2B2/src/hotspot/share/runtime/os.cpp#L2202-L2203).

Original discussion here 
https://github.com/openjdk/jdk/pull/20852#issuecomment-2350882050.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22745#discussion_r1890345578

Reply via email to