Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/hSpaceCounters.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 | b52782ae3880 |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
35 // that track a collections (logical spaces) in a heap; | 35 // that track a collections (logical spaces) in a heap; |
36 | 36 |
37 class HeapSpaceUsedHelper; | 37 class HeapSpaceUsedHelper; |
38 class G1SpaceMonitoringSupport; | 38 class G1SpaceMonitoringSupport; |
39 | 39 |
40 class HSpaceCounters: public CHeapObj { | 40 class HSpaceCounters: public CHeapObj<mtGC> { |
41 friend class VMStructs; | 41 friend class VMStructs; |
42 | 42 |
43 private: | 43 private: |
44 PerfVariable* _capacity; | 44 PerfVariable* _capacity; |
45 PerfVariable* _used; | 45 PerfVariable* _used; |
53 | 53 |
54 HSpaceCounters(const char* name, int ordinal, size_t max_size, | 54 HSpaceCounters(const char* name, int ordinal, size_t max_size, |
55 size_t initial_capacity, GenerationCounters* gc); | 55 size_t initial_capacity, GenerationCounters* gc); |
56 | 56 |
57 ~HSpaceCounters() { | 57 ~HSpaceCounters() { |
58 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); | 58 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); |
59 } | 59 } |
60 | 60 |
61 inline void update_capacity(size_t v) { | 61 inline void update_capacity(size_t v) { |
62 _capacity->set_value(v); | 62 _capacity->set_value(v); |
63 } | 63 } |