< prev index next >

src/share/vm/gc/g1/g1RemSetSummary.hpp

Print this page
rev 13167 : imported patch 8179677-rename-conc-refined-cards
rev 13168 : [mq]: 8179677-erik-review


  25 #ifndef SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
  26 #define SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
  27 
  28 #include "utilities/globalDefinitions.hpp"
  29 #include "utilities/ostream.hpp"
  30 
  31 class G1RemSet;
  32 
  33 // A G1RemSetSummary manages statistical information about the G1RemSet
  34 
  35 class G1RemSetSummary VALUE_OBJ_CLASS_SPEC {
  36 private:
  37   friend class GetRSThreadVTimeClosure;
  38 
  39   G1RemSet* _remset;
  40 
  41   G1RemSet* remset() const {
  42     return _remset;
  43   }
  44 
  45   size_t _num_refined_cards;
  46   size_t _num_processed_buf_mutator;
  47   size_t _num_processed_buf_rs_threads;
  48 
  49   size_t _num_coarsenings;
  50 
  51   double* _rs_threads_vtimes;
  52   size_t _num_vtimes;
  53 
  54   double _sampling_thread_vtime;
  55 
  56   void set_rs_thread_vtime(uint thread, double value);
  57   void set_sampling_thread_vtime(double value) {
  58     _sampling_thread_vtime = value;
  59   }
  60 
  61   // update this summary with current data from various places
  62   void update();
  63 
  64 public:
  65   G1RemSetSummary();
  66   ~G1RemSetSummary();
  67 
  68   // set the counters in this summary to the values of the others
  69   void set(G1RemSetSummary* other);
  70   // subtract all counters from the other summary, and set them in the current
  71   void subtract_from(G1RemSetSummary* other);
  72 
  73   // initialize and get the first sampling
  74   void initialize(G1RemSet* remset);
  75   bool const initialized() { return _rs_threads_vtimes != NULL; }
  76 
  77   void print_on(outputStream* out);
  78 
  79   double rs_thread_vtime(uint thread) const;
  80 
  81   double sampling_thread_vtime() const {
  82     return _sampling_thread_vtime;
  83   }
  84 
  85   size_t num_refined_cards() const {
  86     return _num_refined_cards;
  87   }
  88 
  89   size_t num_processed_buf_mutator() const {
  90     return _num_processed_buf_mutator;
  91   }
  92 
  93   size_t num_processed_buf_rs_threads() const {
  94     return _num_processed_buf_rs_threads;
  95   }
  96 
  97   size_t num_processed_buf_total() const {
  98     return num_processed_buf_mutator() + num_processed_buf_rs_threads();
  99   }
 100 
 101   size_t num_coarsenings() const {
 102     return _num_coarsenings;
 103   }
 104 };
 105 
 106 #endif // SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP


  25 #ifndef SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
  26 #define SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
  27 
  28 #include "utilities/globalDefinitions.hpp"
  29 #include "utilities/ostream.hpp"
  30 
  31 class G1RemSet;
  32 
  33 // A G1RemSetSummary manages statistical information about the G1RemSet
  34 
  35 class G1RemSetSummary VALUE_OBJ_CLASS_SPEC {
  36 private:
  37   friend class GetRSThreadVTimeClosure;
  38 
  39   G1RemSet* _remset;
  40 
  41   G1RemSet* remset() const {
  42     return _remset;
  43   }
  44 
  45   size_t _num_conc_refined_cards;
  46   size_t _num_processed_buf_mutator;
  47   size_t _num_processed_buf_rs_threads;
  48 
  49   size_t _num_coarsenings;
  50 
  51   double* _rs_threads_vtimes;
  52   size_t _num_vtimes;
  53 
  54   double _sampling_thread_vtime;
  55 
  56   void set_rs_thread_vtime(uint thread, double value);
  57   void set_sampling_thread_vtime(double value) {
  58     _sampling_thread_vtime = value;
  59   }
  60 
  61   // update this summary with current data from various places
  62   void update();
  63 
  64 public:
  65   G1RemSetSummary();
  66   ~G1RemSetSummary();
  67 
  68   // set the counters in this summary to the values of the others
  69   void set(G1RemSetSummary* other);
  70   // subtract all counters from the other summary, and set them in the current
  71   void subtract_from(G1RemSetSummary* other);
  72 
  73   // initialize and get the first sampling
  74   void initialize(G1RemSet* remset);
  75   bool const initialized() { return _rs_threads_vtimes != NULL; }
  76 
  77   void print_on(outputStream* out);
  78 
  79   double rs_thread_vtime(uint thread) const;
  80 
  81   double sampling_thread_vtime() const {
  82     return _sampling_thread_vtime;
  83   }
  84 
  85   size_t num_conc_refined_cards() const {
  86     return _num_conc_refined_cards;
  87   }
  88 
  89   size_t num_processed_buf_mutator() const {
  90     return _num_processed_buf_mutator;
  91   }
  92 
  93   size_t num_processed_buf_rs_threads() const {
  94     return _num_processed_buf_rs_threads;
  95   }
  96 
  97   size_t num_processed_buf_total() const {
  98     return num_processed_buf_mutator() + num_processed_buf_rs_threads();
  99   }
 100 
 101   size_t num_coarsenings() const {
 102     return _num_coarsenings;
 103   }
 104 };
 105 
 106 #endif // SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
< prev index next >