RFR: 8304824: NMT should not use ThreadCritical [v8]
Thomas Stuefe
stuefe at openjdk.org
Mon Oct 28 16:12:39 UTC 2024
On Mon, 28 Oct 2024 15:50:00 GMT, Robert Toyonaga <duke at 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
More information about the serviceability-dev
mailing list