src/share/vm/memory/metaspaceCounters.hpp

changeset 5531
1a8fb39bdbc4
parent 5015
868d87ed63c8
child 5716
73d0d0218068
equal deleted inserted replaced
5529:e5003079dfa5 5531:1a8fb39bdbc4
23 */ 23 */
24 24
25 #ifndef SHARE_VM_MEMORY_METASPACECOUNTERS_HPP 25 #ifndef SHARE_VM_MEMORY_METASPACECOUNTERS_HPP
26 #define SHARE_VM_MEMORY_METASPACECOUNTERS_HPP 26 #define SHARE_VM_MEMORY_METASPACECOUNTERS_HPP
27 27
28 #include "runtime/perfData.hpp" 28 #include "memory/metaspace.hpp"
29 29
30 class MetaspaceCounters: public CHeapObj<mtClass> { 30 class MetaspacePerfCounters;
31 friend class VMStructs; 31
32 PerfVariable* _capacity; 32 class MetaspaceCounters: public AllStatic {
33 PerfVariable* _used; 33 static MetaspacePerfCounters* _perf_counters;
34 PerfVariable* _max_capacity; 34 static size_t calculate_capacity();
35 static MetaspaceCounters* _metaspace_counters; 35
36 void initialize(size_t min_capacity,
37 size_t max_capacity,
38 size_t curr_capacity,
39 size_t used);
40 size_t calc_total_capacity();
41 public: 36 public:
42 MetaspaceCounters();
43 ~MetaspaceCounters();
44
45 void update_capacity();
46 void update_used();
47 void update_max_capacity();
48
49 void update_all();
50
51 static void initialize_performance_counters(); 37 static void initialize_performance_counters();
52 static void update_performance_counters(); 38 static void update_performance_counters();
39 };
53 40
41 class CompressedClassSpaceCounters: public AllStatic {
42 static MetaspacePerfCounters* _perf_counters;
43 static size_t calculate_capacity();
44 static const Metaspace::MetadataType _class_type = Metaspace::ClassType;
45
46 public:
47 static void initialize_performance_counters();
48 static void update_performance_counters();
54 }; 49 };
50
55 #endif // SHARE_VM_MEMORY_METASPACECOUNTERS_HPP 51 #endif // SHARE_VM_MEMORY_METASPACECOUNTERS_HPP

mercurial