RFR: 8356173: Remove ThreadCritical
Coleen Phillimore
coleenp at openjdk.org
Fri May 9 14:58:55 UTC 2025
On Fri, 9 May 2025 06:11:11 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Updated the description in the bug. This removes the last use of ThreadCritical and replaces it with a global PlatformMutex lock.
>> Tested with tier1-4, and tier1 on all Oracle-supported OSs.
>
> src/hotspot/share/nmt/nmtUsage.cpp line 58:
>
>> 56: // is deducted from mtChunk in the end to give correct values.
>> 57: ChunkPoolLocker lock;
>> 58: const MallocMemorySnapshot* ms = MallocMemorySummary::as_snapshot();
>
> I'd scope this to the as_snapshot call, the subsequent code does not need the locking (lesser chance of accidental recursive locking)
done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25072#discussion_r2081861429
More information about the hotspot-dev
mailing list