hotspot/src/share/vm/services/mallocTracker.hpp
changeset 26288 631bf42cf7c2
parent 25946 1572c9f03fb9
child 27162 0a4a7276949b
--- 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();