RFR: 8277990: NMT: Remove NMT shutdown capability

Zhengyu Gu zgu at openjdk.java.net
Thu Dec 2 18:13:17 UTC 2021


On Thu, 2 Dec 2021 16:09:31 GMT, Thomas Stuefe <stuefe 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
>
> src/hotspot/os/posix/perfMemory_posix.cpp line 1031:
> 
>> 1029: static void unmap_shared(char* addr, size_t bytes) {
>> 1030:   int res;
>> 1031:   if (MemTracker::tracking_level() >= NMT_summary) {
> 
> Just an idle thought, maybe we could add a `MemTracker::is_enabled()` as a shortcut for level > off.

I was thinking about doing it in followup, yea, why not here.

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

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


More information about the hotspot-dev mailing list