181 |
181 |
182 size_t code_root_mem_size() const { return _code_root_mem_size; } |
182 size_t code_root_mem_size() const { return _code_root_mem_size; } |
183 size_t code_root_elems() const { return _code_root_elems; } |
183 size_t code_root_elems() const { return _code_root_elems; } |
184 |
184 |
185 void print_rs_mem_info_on(outputStream * out, size_t total) { |
185 void print_rs_mem_info_on(outputStream * out, size_t total) { |
186 out->print_cr(" "SIZE_FORMAT_W(8) "%s (%5.1f%%) by "SIZE_FORMAT" %s regions", |
186 out->print_cr(" " SIZE_FORMAT_W(8) "%s (%5.1f%%) by " SIZE_FORMAT " %s regions", |
187 byte_size_in_proper_unit(rs_mem_size()), |
187 byte_size_in_proper_unit(rs_mem_size()), |
188 proper_unit_for_byte_size(rs_mem_size()), |
188 proper_unit_for_byte_size(rs_mem_size()), |
189 rs_mem_size_percent_of(total), amount(), _name); |
189 rs_mem_size_percent_of(total), amount(), _name); |
190 } |
190 } |
191 |
191 |
192 void print_cards_occupied_info_on(outputStream * out, size_t total) { |
192 void print_cards_occupied_info_on(outputStream * out, size_t total) { |
193 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) entries by "SIZE_FORMAT" %s regions", |
193 out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) entries by " SIZE_FORMAT " %s regions", |
194 cards_occupied(), cards_occupied_percent_of(total), amount(), _name); |
194 cards_occupied(), cards_occupied_percent_of(total), amount(), _name); |
195 } |
195 } |
196 |
196 |
197 void print_code_root_mem_info_on(outputStream * out, size_t total) { |
197 void print_code_root_mem_info_on(outputStream * out, size_t total) { |
198 out->print_cr(" "SIZE_FORMAT_W(8) "%s (%5.1f%%) by "SIZE_FORMAT" %s regions", |
198 out->print_cr(" " SIZE_FORMAT_W(8) "%s (%5.1f%%) by " SIZE_FORMAT " %s regions", |
199 byte_size_in_proper_unit(code_root_mem_size()), |
199 byte_size_in_proper_unit(code_root_mem_size()), |
200 proper_unit_for_byte_size(code_root_mem_size()), |
200 proper_unit_for_byte_size(code_root_mem_size()), |
201 code_root_mem_size_percent_of(total), amount(), _name); |
201 code_root_mem_size_percent_of(total), amount(), _name); |
202 } |
202 } |
203 |
203 |
204 void print_code_root_elems_info_on(outputStream * out, size_t total) { |
204 void print_code_root_elems_info_on(outputStream * out, size_t total) { |
205 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) elements by "SIZE_FORMAT" %s regions", |
205 out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) elements by " SIZE_FORMAT " %s regions", |
206 code_root_elems(), code_root_elems_percent_of(total), amount(), _name); |
206 code_root_elems(), code_root_elems_percent_of(total), amount(), _name); |
207 } |
207 } |
208 }; |
208 }; |
209 |
209 |
210 |
210 |
296 byte_size_in_proper_unit(HeapRegionRemSet::static_mem_size()), |
296 byte_size_in_proper_unit(HeapRegionRemSet::static_mem_size()), |
297 proper_unit_for_byte_size(HeapRegionRemSet::static_mem_size()), |
297 proper_unit_for_byte_size(HeapRegionRemSet::static_mem_size()), |
298 byte_size_in_proper_unit(HeapRegionRemSet::fl_mem_size()), |
298 byte_size_in_proper_unit(HeapRegionRemSet::fl_mem_size()), |
299 proper_unit_for_byte_size(HeapRegionRemSet::fl_mem_size())); |
299 proper_unit_for_byte_size(HeapRegionRemSet::fl_mem_size())); |
300 |
300 |
301 out->print_cr(" "SIZE_FORMAT" occupied cards represented.", |
301 out->print_cr(" " SIZE_FORMAT " occupied cards represented.", |
302 total_cards_occupied()); |
302 total_cards_occupied()); |
303 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
303 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
304 (*current)->print_cards_occupied_info_on(out, total_cards_occupied()); |
304 (*current)->print_cards_occupied_info_on(out, total_cards_occupied()); |
305 } |
305 } |
306 |
306 |
307 // Largest sized rem set region statistics |
307 // Largest sized rem set region statistics |
308 HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set(); |
308 HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set(); |
309 out->print_cr(" Region with largest rem set = "HR_FORMAT", " |
309 out->print_cr(" Region with largest rem set = " HR_FORMAT ", " |
310 "size = "SIZE_FORMAT "%s, occupied = "SIZE_FORMAT "%s.", |
310 "size = " SIZE_FORMAT "%s, occupied = " SIZE_FORMAT "%s.", |
311 HR_FORMAT_PARAMS(max_rs_mem_sz_region()), |
311 HR_FORMAT_PARAMS(max_rs_mem_sz_region()), |
312 byte_size_in_proper_unit(rem_set->mem_size()), |
312 byte_size_in_proper_unit(rem_set->mem_size()), |
313 proper_unit_for_byte_size(rem_set->mem_size()), |
313 proper_unit_for_byte_size(rem_set->mem_size()), |
314 byte_size_in_proper_unit(rem_set->occupied()), |
314 byte_size_in_proper_unit(rem_set->occupied()), |
315 proper_unit_for_byte_size(rem_set->occupied())); |
315 proper_unit_for_byte_size(rem_set->occupied())); |
324 |
324 |
325 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
325 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
326 (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz()); |
326 (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz()); |
327 } |
327 } |
328 |
328 |
329 out->print_cr(" "SIZE_FORMAT" code roots represented.", |
329 out->print_cr(" " SIZE_FORMAT " code roots represented.", |
330 total_code_root_elems()); |
330 total_code_root_elems()); |
331 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
331 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
332 (*current)->print_code_root_elems_info_on(out, total_code_root_elems()); |
332 (*current)->print_code_root_elems_info_on(out, total_code_root_elems()); |
333 } |
333 } |
334 |
334 |
335 out->print_cr(" Region with largest amount of code roots = "HR_FORMAT", " |
335 out->print_cr(" Region with largest amount of code roots = " HR_FORMAT ", " |
336 "size = "SIZE_FORMAT "%s, num_elems = "SIZE_FORMAT".", |
336 "size = " SIZE_FORMAT "%s, num_elems = " SIZE_FORMAT ".", |
337 HR_FORMAT_PARAMS(max_code_root_mem_sz_region()), |
337 HR_FORMAT_PARAMS(max_code_root_mem_sz_region()), |
338 byte_size_in_proper_unit(max_code_root_rem_set->strong_code_roots_mem_size()), |
338 byte_size_in_proper_unit(max_code_root_rem_set->strong_code_roots_mem_size()), |
339 proper_unit_for_byte_size(max_code_root_rem_set->strong_code_roots_mem_size()), |
339 proper_unit_for_byte_size(max_code_root_rem_set->strong_code_roots_mem_size()), |
340 max_code_root_rem_set->strong_code_roots_list_length()); |
340 max_code_root_rem_set->strong_code_roots_list_length()); |
341 |
341 |
342 } |
342 } |
343 }; |
343 }; |
344 |
344 |
345 void G1RemSetSummary::print_on(outputStream* out) { |
345 void G1RemSetSummary::print_on(outputStream* out) { |
346 out->print_cr("\n Recent concurrent refinement statistics"); |
346 out->print_cr("\n Recent concurrent refinement statistics"); |
347 out->print_cr(" Processed "SIZE_FORMAT" cards", |
347 out->print_cr(" Processed " SIZE_FORMAT " cards", |
348 num_concurrent_refined_cards()); |
348 num_concurrent_refined_cards()); |
349 out->print_cr(" Of "SIZE_FORMAT" completed buffers:", num_processed_buf_total()); |
349 out->print_cr(" Of " SIZE_FORMAT " completed buffers:", num_processed_buf_total()); |
350 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by concurrent RS threads.", |
350 out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) by concurrent RS threads.", |
351 num_processed_buf_total(), |
351 num_processed_buf_total(), |
352 percent_of(num_processed_buf_rs_threads(), num_processed_buf_total())); |
352 percent_of(num_processed_buf_rs_threads(), num_processed_buf_total())); |
353 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by mutator threads.", |
353 out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) by mutator threads.", |
354 num_processed_buf_mutator(), |
354 num_processed_buf_mutator(), |
355 percent_of(num_processed_buf_mutator(), num_processed_buf_total())); |
355 percent_of(num_processed_buf_mutator(), num_processed_buf_total())); |
356 out->print_cr(" Did "SIZE_FORMAT" coarsenings.", num_coarsenings()); |
356 out->print_cr(" Did " SIZE_FORMAT " coarsenings.", num_coarsenings()); |
357 out->print_cr(" Concurrent RS threads times (s)"); |
357 out->print_cr(" Concurrent RS threads times (s)"); |
358 out->print(" "); |
358 out->print(" "); |
359 for (uint i = 0; i < _num_vtimes; i++) { |
359 for (uint i = 0; i < _num_vtimes; i++) { |
360 out->print(" %5.2f", rs_thread_vtime(i)); |
360 out->print(" %5.2f", rs_thread_vtime(i)); |
361 } |
361 } |