< prev index next >

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

Print this page
rev 60637 : 8252141: Rename G1YoungRemSetSamplingThread to better reflect its purpose
Reviewed-by:


  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_GC_G1_G1REMSETSUMMARY_HPP
  26 #define SHARE_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 {
  36   size_t _num_coarsenings;
  37 
  38   size_t _num_vtimes;
  39   double* _rs_threads_vtimes;
  40 
  41   double _sampling_thread_vtime;
  42 
  43   void set_rs_thread_vtime(uint thread, double value);
  44   void set_sampling_thread_vtime(double value) {
  45     _sampling_thread_vtime = value;
  46   }
  47 
  48   // update this summary with current data from various places
  49   void update();
  50 
  51 public:
  52   G1RemSetSummary(bool should_update = true);
  53 
  54   ~G1RemSetSummary();
  55 
  56   // set the counters in this summary to the values of the others
  57   void set(G1RemSetSummary* other);
  58   // subtract all counters from the other summary, and set them in the current
  59   void subtract_from(G1RemSetSummary* other);
  60 
  61   void print_on(outputStream* out);
  62 
  63   double rs_thread_vtime(uint thread) const;
  64 
  65   double sampling_thread_vtime() const {
  66     return _sampling_thread_vtime;
  67   }
  68 
  69   size_t num_coarsenings() const {
  70     return _num_coarsenings;
  71   }
  72 };
  73 
  74 #endif // SHARE_GC_G1_G1REMSETSUMMARY_HPP


  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_GC_G1_G1REMSETSUMMARY_HPP
  26 #define SHARE_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 {
  36   size_t _num_coarsenings;
  37 
  38   size_t _num_vtimes;
  39   double* _rs_threads_vtimes;
  40 
  41   double _service_thread_vtime;
  42 
  43   void set_rs_thread_vtime(uint thread, double value);
  44   void set_service_thread_vtime(double value) {
  45     _service_thread_vtime = value;
  46   }
  47 
  48   // update this summary with current data from various places
  49   void update();
  50 
  51 public:
  52   G1RemSetSummary(bool should_update = true);
  53 
  54   ~G1RemSetSummary();
  55 
  56   // set the counters in this summary to the values of the others
  57   void set(G1RemSetSummary* other);
  58   // subtract all counters from the other summary, and set them in the current
  59   void subtract_from(G1RemSetSummary* other);
  60 
  61   void print_on(outputStream* out);
  62 
  63   double rs_thread_vtime(uint thread) const;
  64 
  65   double service_thread_vtime() const {
  66     return _service_thread_vtime;
  67   }
  68 
  69   size_t num_coarsenings() const {
  70     return _num_coarsenings;
  71   }
  72 };
  73 
  74 #endif // SHARE_GC_G1_G1REMSETSUMMARY_HPP
< prev index next >