8186748: NMT: memTracker::record_virtual_memory_reserve_and_commit() does not tag the memory as committed
authorzgu
Thu, 24 Aug 2017 15:00:10 -0400
changeset 46976 6d4058ac744f
parent 46975 59d4586da7bc
child 46979 054736045ae7
child 46981 add50afae9e1
8186748: NMT: memTracker::record_virtual_memory_reserve_and_commit() does not tag the memory as committed Summary: Fixed bug that results NMT to report "Shared class space" as reserved, but not committed memory Reviewed-by: shade, coleenp
hotspot/src/share/vm/services/memTracker.hpp
--- a/hotspot/src/share/vm/services/memTracker.hpp	Thu Aug 24 14:00:04 2017 +0000
+++ b/hotspot/src/share/vm/services/memTracker.hpp	Thu Aug 24 15:00:10 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -213,6 +213,7 @@
       if (tracking_level() < NMT_summary) return;
       VirtualMemoryTracker::add_reserved_region((address)addr, size,
         stack, flag, true);
+      VirtualMemoryTracker::add_committed_region((address)addr, size, stack);
     }
   }