Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/collectorCounters.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 | f95d63e2154a |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
28 #include "runtime/perfData.hpp" | 28 #include "runtime/perfData.hpp" |
29 | 29 |
30 // CollectorCounters is a holder class for performance counters | 30 // CollectorCounters is a holder class for performance counters |
31 // that track a collector | 31 // that track a collector |
32 | 32 |
33 class CollectorCounters: public CHeapObj { | 33 class CollectorCounters: public CHeapObj<mtGC> { |
34 friend class VMStructs; | 34 friend class VMStructs; |
35 | 35 |
36 private: | 36 private: |
37 PerfCounter* _invocations; | 37 PerfCounter* _invocations; |
38 PerfCounter* _time; | 38 PerfCounter* _time; |
48 public: | 48 public: |
49 | 49 |
50 CollectorCounters(const char* name, int ordinal); | 50 CollectorCounters(const char* name, int ordinal); |
51 | 51 |
52 ~CollectorCounters() { | 52 ~CollectorCounters() { |
53 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); | 53 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); |
54 } | 54 } |
55 | 55 |
56 inline PerfCounter* invocation_counter() const { return _invocations; } | 56 inline PerfCounter* invocation_counter() const { return _invocations; } |
57 | 57 |
58 inline PerfCounter* time_counter() const { return _time; } | 58 inline PerfCounter* time_counter() const { return _time; } |