diff src/share/vm/services/memSnapshot.hpp @ 7464:ecd24264898b

8005048: NMT: #loaded classes needs to just show the # defined classes Summary: Count number of instance classes so that it matches class metadata size Reviewed-by: coleenp, acorn
author zgu
date Tue, 08 Jan 2013 14:04:25 -0500
parents 49cbd3e25ba9
children b80cc96882f7
line wrap: on
line diff
--- a/src/share/vm/services/memSnapshot.hpp	Fri Dec 07 10:55:16 2012 -0800
+++ b/src/share/vm/services/memSnapshot.hpp	Tue Jan 08 14:04:25 2013 -0500
@@ -355,6 +355,9 @@
   // the lock to protect this snapshot
   Monitor*              _lock;
 
+  // the number of instance classes
+  int                   _number_of_classes;
+
   NOT_PRODUCT(size_t    _untracked_count;)
   friend class MemBaseline;
 
@@ -375,8 +378,9 @@
   // merge a per-thread memory recorder into staging area
   bool merge(MemRecorder* rec);
   // promote staged data to snapshot
-  bool promote();
+  bool promote(int number_of_classes);
 
+  int  number_of_classes() const { return _number_of_classes; }
 
   void wait(long timeout) {
     assert(_lock != NULL, "Just check");