RFR: 8277990: NMT: Remove NMT shutdown capability

Thomas Stuefe stuefe at openjdk.java.net
Thu Dec 2 15:49:28 UTC 2021


On Wed, 1 Dec 2021 16:00:09 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> NMT shutdown functionality is a remnant of its first implementation, which could consume excessive amount of memory, therefore, it needed capability to shut it self down to ensure health of JVM. This is no longer a case for current implementation.
> 
> After JDK-8277946, there is no longer a use, so it can be removed.
> 
> Test:
> - [x] hotspot_nmt
> - [x] tier1 with NMT on

> You are talking about AccessLock, right?

> As @dholmes-ora mentioned in PR #6267, the name is misleading: it is not a lock, but a countdown latch. It allows multi-reader to access MallocSiteTable, but once an exclusive access is requested, the requester sets counter to negative number and waits all readers to exit, then no readers and writers are allowed, so that MallocSiteTable can be safely destroyed.

> AccessLock was invented to guard MallocSiteTable, as ThreadCritical is too expensive for malloc tracking.

Just to see I get it right, AccessLock is not needed anymore because we don't destroy the MallocSiteTable? We don't need it to guard the table when we add callstacks?

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

PR: https://git.openjdk.java.net/jdk/pull/6640


More information about the hotspot-dev mailing list