8199741: NMT: Tag safepoint polling pages
authorzgu
Mon, 19 Mar 2018 13:38:35 -0400
changeset 49459 19952ddce953
parent 49458 ddf9c5044e16
child 49460 e786d01c47f2
8199741: NMT: Tag safepoint polling pages Summary: Added NMT tag for Safepoint polling pages Reviewed-by: coleenp, shade
src/hotspot/share/runtime/safepointMechanism.cpp
--- a/src/hotspot/share/runtime/safepointMechanism.cpp	Wed Mar 14 17:55:15 2018 +0800
+++ b/src/hotspot/share/runtime/safepointMechanism.cpp	Mon Mar 19 13:38:35 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 #include "runtime/globals.hpp"
 #include "runtime/os.hpp"
 #include "runtime/safepointMechanism.inline.hpp"
+#include "services/memTracker.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 SafepointMechanism::PollingType SafepointMechanism::_polling_type = SafepointMechanism::_global_page_poll;
@@ -50,6 +51,7 @@
       const size_t allocation_size = 2 * page_size;
       char* polling_page = os::reserve_memory(allocation_size, NULL, page_size);
       os::commit_memory_or_exit(polling_page, allocation_size, false, "Unable to commit Safepoint polling page");
+      MemTracker::record_virtual_memory_type((address)polling_page, mtInternal);
 
       char* bad_page  = polling_page;
       char* good_page = polling_page + page_size;