src/hotspot/share/runtime/safepointMechanism.cpp
changeset 49459 19952ddce953
parent 48506 478e77658965
child 51264 cf34c71ca27c
--- 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;