8210314: [aix] NMT does not show "Safepoint" memory type
authorstuefe
Mon, 03 Sep 2018 14:27:03 +0200
changeset 51621 b0c81cfd4dc9
parent 51620 4871c2d2e97e
child 51622 de1a82a239e2
8210314: [aix] NMT does not show "Safepoint" memory type Reviewed-by: goetz, mbaesken
src/hotspot/os/aix/safepointMechanism_aix.cpp
--- a/src/hotspot/os/aix/safepointMechanism_aix.cpp	Mon Sep 03 13:42:58 2018 +0300
+++ b/src/hotspot/os/aix/safepointMechanism_aix.cpp	Mon Sep 03 14:27:03 2018 +0200
@@ -27,6 +27,7 @@
 #include "runtime/globals.hpp"
 #include "runtime/os.hpp"
 #include "runtime/safepointMechanism.hpp"
+#include "services/memTracker.hpp"
 #include <sys/mman.h>
 
 void SafepointMechanism::pd_initialize() {
@@ -95,6 +96,9 @@
   log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(map_address));
   os::set_polling_page((address)(map_address));
 
+  // Register polling page with NMT.
+  MemTracker::record_virtual_memory_reserve_and_commit(map_address, map_size, CALLER_PC, mtSafepoint);
+
   // Use same page for ThreadLocalHandshakes without SIGTRAP
   if (ThreadLocalHandshakes) {
     set_uses_thread_local_poll();