comparison src/share/vm/gc_implementation/shared/cSpaceCounters.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 da91efe96a93
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
30 #include "runtime/perfData.hpp" 30 #include "runtime/perfData.hpp"
31 31
32 // A CSpaceCounters is a holder class for performance counters 32 // A CSpaceCounters is a holder class for performance counters
33 // that track a space; 33 // that track a space;
34 34
35 class CSpaceCounters: public CHeapObj { 35 class CSpaceCounters: public CHeapObj<mtGC> {
36 friend class VMStructs; 36 friend class VMStructs;
37 37
38 private: 38 private:
39 PerfVariable* _capacity; 39 PerfVariable* _capacity;
40 PerfVariable* _used; 40 PerfVariable* _used;
50 50
51 CSpaceCounters(const char* name, int ordinal, size_t max_size, 51 CSpaceCounters(const char* name, int ordinal, size_t max_size,
52 ContiguousSpace* s, GenerationCounters* gc); 52 ContiguousSpace* s, GenerationCounters* gc);
53 53
54 ~CSpaceCounters() { 54 ~CSpaceCounters() {
55 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); 55 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtInternal);
56 } 56 }
57 57
58 inline void update_capacity() { 58 inline void update_capacity() {
59 _capacity->set_value(_space->capacity()); 59 _capacity->set_value(_space->capacity());
60 } 60 }