RFR: 8356173: Remove ThreadCritical

Zhengyu Gu zgu at openjdk.org
Fri May 9 13:22:52 UTC 2025


On Tue, 6 May 2025 20:32:05 GMT, Coleen Phillimore <coleenp 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/mallocTracker.cpp line 68:

> 66:   // copy is going on, because their size is adjusted using this
> 67:   // buffer in make_adjustment().
> 68:   ChunkPoolLocker lock;

At the time NMT was written, `ThreadCritical` was the only native lock. I wonder it is the time NMT gets its own lock?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25072#discussion_r2081656758


More information about the hotspot-dev mailing list