src/share/vm/memory/metaspaceCounters.hpp

changeset 5531
1a8fb39bdbc4
parent 5015
868d87ed63c8
child 5716
73d0d0218068
     1.1 --- a/src/share/vm/memory/metaspaceCounters.hpp	Fri Aug 16 10:06:58 2013 -0700
     1.2 +++ b/src/share/vm/memory/metaspaceCounters.hpp	Wed Aug 07 16:47:32 2013 +0200
     1.3 @@ -25,31 +25,27 @@
     1.4  #ifndef SHARE_VM_MEMORY_METASPACECOUNTERS_HPP
     1.5  #define SHARE_VM_MEMORY_METASPACECOUNTERS_HPP
     1.6  
     1.7 -#include "runtime/perfData.hpp"
     1.8 +#include "memory/metaspace.hpp"
     1.9  
    1.10 -class MetaspaceCounters: public CHeapObj<mtClass> {
    1.11 -  friend class VMStructs;
    1.12 -  PerfVariable*      _capacity;
    1.13 -  PerfVariable*      _used;
    1.14 -  PerfVariable*      _max_capacity;
    1.15 -  static MetaspaceCounters* _metaspace_counters;
    1.16 -  void initialize(size_t min_capacity,
    1.17 -                  size_t max_capacity,
    1.18 -                  size_t curr_capacity,
    1.19 -                  size_t used);
    1.20 -  size_t calc_total_capacity();
    1.21 +class MetaspacePerfCounters;
    1.22 +
    1.23 +class MetaspaceCounters: public AllStatic {
    1.24 +  static MetaspacePerfCounters* _perf_counters;
    1.25 +  static size_t calculate_capacity();
    1.26 +
    1.27   public:
    1.28 -  MetaspaceCounters();
    1.29 -  ~MetaspaceCounters();
    1.30 -
    1.31 -  void update_capacity();
    1.32 -  void update_used();
    1.33 -  void update_max_capacity();
    1.34 -
    1.35 -  void update_all();
    1.36 -
    1.37    static void initialize_performance_counters();
    1.38    static void update_performance_counters();
    1.39 +};
    1.40  
    1.41 +class CompressedClassSpaceCounters: public AllStatic {
    1.42 +  static MetaspacePerfCounters* _perf_counters;
    1.43 +  static size_t calculate_capacity();
    1.44 +  static const Metaspace::MetadataType _class_type = Metaspace::ClassType;
    1.45 +
    1.46 + public:
    1.47 +  static void initialize_performance_counters();
    1.48 +  static void update_performance_counters();
    1.49  };
    1.50 +
    1.51  #endif // SHARE_VM_MEMORY_METASPACECOUNTERS_HPP

mercurial