< prev index next >

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

Print this page




 128 }
 129 
 130 void G1RemSetSummary::subtract_from(G1RemSetSummary* other) {
 131   assert(other != NULL, "just checking");
 132   assert(_num_vtimes == other->_num_vtimes, "just checking");
 133 
 134   _num_conc_refined_cards = other->num_conc_refined_cards() - _num_conc_refined_cards;
 135 
 136   _num_processed_buf_mutator = other->num_processed_buf_mutator() - _num_processed_buf_mutator;
 137   _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads() - _num_processed_buf_rs_threads;
 138 
 139   _num_coarsenings = other->num_coarsenings() - _num_coarsenings;
 140 
 141   for (uint i = 0; i < _num_vtimes; i++) {
 142     set_rs_thread_vtime(i, other->rs_thread_vtime(i) - rs_thread_vtime(i));
 143   }
 144 
 145   _sampling_thread_vtime = other->sampling_thread_vtime() - _sampling_thread_vtime;
 146 }
 147 
 148 class RegionTypeCounter VALUE_OBJ_CLASS_SPEC {
 149 private:
 150   const char* _name;
 151 
 152   size_t _rs_mem_size;
 153   size_t _cards_occupied;
 154   size_t _amount;
 155 
 156   size_t _code_root_mem_size;
 157   size_t _code_root_elems;
 158 
 159   double rs_mem_size_percent_of(size_t total) {
 160     return percent_of(_rs_mem_size, total);
 161   }
 162 
 163   double cards_occupied_percent_of(size_t total) {
 164     return percent_of(_cards_occupied, total);
 165   }
 166 
 167   double code_root_mem_size_percent_of(size_t total) {
 168     return percent_of(_code_root_mem_size, total);




 128 }
 129 
 130 void G1RemSetSummary::subtract_from(G1RemSetSummary* other) {
 131   assert(other != NULL, "just checking");
 132   assert(_num_vtimes == other->_num_vtimes, "just checking");
 133 
 134   _num_conc_refined_cards = other->num_conc_refined_cards() - _num_conc_refined_cards;
 135 
 136   _num_processed_buf_mutator = other->num_processed_buf_mutator() - _num_processed_buf_mutator;
 137   _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads() - _num_processed_buf_rs_threads;
 138 
 139   _num_coarsenings = other->num_coarsenings() - _num_coarsenings;
 140 
 141   for (uint i = 0; i < _num_vtimes; i++) {
 142     set_rs_thread_vtime(i, other->rs_thread_vtime(i) - rs_thread_vtime(i));
 143   }
 144 
 145   _sampling_thread_vtime = other->sampling_thread_vtime() - _sampling_thread_vtime;
 146 }
 147 
 148 class RegionTypeCounter {
 149 private:
 150   const char* _name;
 151 
 152   size_t _rs_mem_size;
 153   size_t _cards_occupied;
 154   size_t _amount;
 155 
 156   size_t _code_root_mem_size;
 157   size_t _code_root_elems;
 158 
 159   double rs_mem_size_percent_of(size_t total) {
 160     return percent_of(_rs_mem_size, total);
 161   }
 162 
 163   double cards_occupied_percent_of(size_t total) {
 164     return percent_of(_cards_occupied, total);
 165   }
 166 
 167   double code_root_mem_size_percent_of(size_t total) {
 168     return percent_of(_code_root_mem_size, total);


< prev index next >