Mercurial > hg > graal-jvmci-8
diff src/share/vm/services/memSnapshot.cpp @ 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 | fc64254f5579 |
line wrap: on
line diff
--- a/src/share/vm/services/memSnapshot.cpp Fri Dec 07 10:55:16 2012 -0800 +++ b/src/share/vm/services/memSnapshot.cpp Tue Jan 08 14:04:25 2013 -0500 @@ -384,6 +384,7 @@ _staging_area.init(); _lock = new (std::nothrow) Mutex(Monitor::max_nonleaf - 1, "memSnapshotLock"); NOT_PRODUCT(_untracked_count = 0;) + _number_of_classes = 0; } MemSnapshot::~MemSnapshot() { @@ -479,7 +480,7 @@ // promote data to next generation -bool MemSnapshot::promote() { +bool MemSnapshot::promote(int number_of_classes) { assert(_alloc_ptrs != NULL && _vm_ptrs != NULL, "Just check"); assert(_staging_area.malloc_data() != NULL && _staging_area.vm_data() != NULL, "Just check"); @@ -496,6 +497,7 @@ NOT_PRODUCT(check_malloc_pointers();) _staging_area.clear(); + _number_of_classes = number_of_classes; return promoted; }