comparison src/share/vm/gc_implementation/shared/generationCounters.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 8229bd737950
children b9a9ed0f8eeb
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
29 #include "runtime/virtualspace.hpp" 29 #include "runtime/virtualspace.hpp"
30 30
31 // A GenerationCounter is a holder class for performance counters 31 // A GenerationCounter is a holder class for performance counters
32 // that track a generation 32 // that track a generation
33 33
34 class GenerationCounters: public CHeapObj { 34 class GenerationCounters: public CHeapObj<mtGC> {
35 friend class VMStructs; 35 friend class VMStructs;
36 36
37 private: 37 private:
38 void initialize(const char* name, int ordinal, int spaces, 38 void initialize(const char* name, int ordinal, int spaces,
39 size_t min_capacity, size_t max_capacity, 39 size_t min_capacity, size_t max_capacity,
67 public: 67 public:
68 GenerationCounters(const char* name, int ordinal, int spaces, 68 GenerationCounters(const char* name, int ordinal, int spaces,
69 VirtualSpace* v); 69 VirtualSpace* v);
70 70
71 ~GenerationCounters() { 71 ~GenerationCounters() {
72 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); 72 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC);
73 } 73 }
74 74
75 virtual void update_all(); 75 virtual void update_all();
76 76
77 const char* name_space() const { return _name_space; } 77 const char* name_space() const { return _name_space; }