comparison src/share/vm/gc_implementation/shared/gSpaceCounters.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
32 #endif 32 #endif
33 33
34 // A GSpaceCounter is a holder class for performance counters 34 // A GSpaceCounter is a holder class for performance counters
35 // that track a space; 35 // that track a space;
36 36
37 class GSpaceCounters: public CHeapObj { 37 class GSpaceCounters: public CHeapObj<mtGC> {
38 friend class VMStructs; 38 friend class VMStructs;
39 39
40 private: 40 private:
41 PerfVariable* _capacity; 41 PerfVariable* _capacity;
42 PerfVariable* _used; 42 PerfVariable* _used;
52 52
53 GSpaceCounters(const char* name, int ordinal, size_t max_size, Generation* g, 53 GSpaceCounters(const char* name, int ordinal, size_t max_size, Generation* g,
54 GenerationCounters* gc, bool sampled=true); 54 GenerationCounters* gc, bool sampled=true);
55 55
56 ~GSpaceCounters() { 56 ~GSpaceCounters() {
57 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); 57 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC);
58 } 58 }
59 59
60 inline void update_capacity() { 60 inline void update_capacity() {
61 _capacity->set_value(_gen->capacity()); 61 _capacity->set_value(_gen->capacity());
62 } 62 }