On Mon, 28 Oct 2024 15:50:00 GMT, Robert Toyonaga <d...@openjdk.org> wrote:

>> Yes I think so. `MemTracker::print_containing_region` first acquires the  
>> NMT lock then the `SharedDecoder_lock` like this:
>> 
>> `MemTracker::print_containing_region` -->
>> `PrintRegionWalker::do_allocation_site` -->
>> `NativeCallStack::print_frame` --> 
>> `Decoder::get_source_info` --> 
>> `Decoder::shared_decoder_lock()`
>
> Otherwise `make test TEST=hotspot_nmt` throws a lock rank error when running 
> the test  `location_printing_mmap_1`. That test uses 
> `MemTracker::print_containing_region`.

Thanks. But eew. Okay, ugly but not easy to fix.
Can you please add a trailing comment behind SharedDecoder lock that it needs 
to be lower than the NMT lock?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20852#discussion_r1819338305

Reply via email to