Mercurial > hg > graal-compiler
comparison src/share/vm/utilities/histogram.hpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | f08d439fab8c |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
75 // | 75 // |
76 // To print the results, invoke print() on your Histogram*. | 76 // To print the results, invoke print() on your Histogram*. |
77 | 77 |
78 #ifdef ASSERT | 78 #ifdef ASSERT |
79 | 79 |
80 class HistogramElement : public CHeapObj { | 80 class HistogramElement : public CHeapObj<mtInternal> { |
81 protected: | 81 protected: |
82 jint _count; | 82 jint _count; |
83 const char* _name; | 83 const char* _name; |
84 | 84 |
85 public: | 85 public: |
89 virtual void increment_count(); | 89 virtual void increment_count(); |
90 void print_on(outputStream* st) const; | 90 void print_on(outputStream* st) const; |
91 virtual int compare(HistogramElement* e1,HistogramElement* e2); | 91 virtual int compare(HistogramElement* e1,HistogramElement* e2); |
92 }; | 92 }; |
93 | 93 |
94 class Histogram : public CHeapObj { | 94 class Histogram : public CHeapObj<mtInternal> { |
95 protected: | 95 protected: |
96 GrowableArray<HistogramElement*>* _elements; | 96 GrowableArray<HistogramElement*>* _elements; |
97 GrowableArray<HistogramElement*>* elements() { return _elements; } | 97 GrowableArray<HistogramElement*>* elements() { return _elements; } |
98 const char* _title; | 98 const char* _title; |
99 const char* title() { return _title; } | 99 const char* title() { return _title; } |