hotspot/src/share/vm/gc/g1/g1RemSetSummary.hpp
changeset 35190 8a4918d9f9ae
parent 35061 be6025ebffea
child 46614 ae1105fff9e4
equal deleted inserted replaced
35189:a69874af6697 35190:8a4918d9f9ae
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
    25 #ifndef SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
    26 #define SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
    26 #define SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
    27 
    27 
       
    28 #include "utilities/globalDefinitions.hpp"
    28 #include "utilities/ostream.hpp"
    29 #include "utilities/ostream.hpp"
    29 
    30 
    30 class G1RemSet;
    31 class G1RemSet;
    31 
    32 
    32 // A G1RemSetSummary manages statistical information about the G1RemSet
    33 // A G1RemSetSummary manages statistical information about the G1RemSet
    55   void set_rs_thread_vtime(uint thread, double value);
    56   void set_rs_thread_vtime(uint thread, double value);
    56   void set_sampling_thread_vtime(double value) {
    57   void set_sampling_thread_vtime(double value) {
    57     _sampling_thread_vtime = value;
    58     _sampling_thread_vtime = value;
    58   }
    59   }
    59 
    60 
    60   void free_and_null() {
       
    61     if (_rs_threads_vtimes) {
       
    62       FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
       
    63       _rs_threads_vtimes = NULL;
       
    64       _num_vtimes = 0;
       
    65     }
       
    66   }
       
    67 
       
    68   // update this summary with current data from various places
    61   // update this summary with current data from various places
    69   void update();
    62   void update();
    70 
    63 
    71 public:
    64 public:
    72   G1RemSetSummary() : _remset(NULL), _num_refined_cards(0),
    65   G1RemSetSummary();
    73     _num_processed_buf_mutator(0), _num_processed_buf_rs_threads(0), _num_coarsenings(0),
    66   ~G1RemSetSummary();
    74     _rs_threads_vtimes(NULL), _num_vtimes(0), _sampling_thread_vtime(0.0f) {
       
    75   }
       
    76 
       
    77   ~G1RemSetSummary() {
       
    78     free_and_null();
       
    79   }
       
    80 
    67 
    81   // set the counters in this summary to the values of the others
    68   // set the counters in this summary to the values of the others
    82   void set(G1RemSetSummary* other);
    69   void set(G1RemSetSummary* other);
    83   // subtract all counters from the other summary, and set them in the current
    70   // subtract all counters from the other summary, and set them in the current
    84   void subtract_from(G1RemSetSummary* other);
    71   void subtract_from(G1RemSetSummary* other);