--- a/hotspot/src/share/vm/services/mallocTracker.hpp Mon Aug 11 10:18:09 2014 -0700
+++ b/hotspot/src/share/vm/services/mallocTracker.hpp Wed Aug 20 08:41:15 2014 -0400
@@ -171,8 +171,9 @@
// Total malloc'd memory used by arenas
size_t total_arena() const;
- inline size_t thread_count() {
- return by_type(mtThreadStack)->malloc_count();
+ inline size_t thread_count() const {
+ MallocMemorySnapshot* s = const_cast<MallocMemorySnapshot*>(this);
+ return s->by_type(mtThreadStack)->malloc_count();
}
void reset();