< prev index next >

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

Print this page




 254     if (r->is_free()) {
 255       current = &_free;
 256     } else if (r->is_young()) {
 257       current = &_young;
 258     } else if (r->is_humongous()) {
 259       current = &_humonguous;
 260     } else if (r->is_old()) {
 261       current = &_old;
 262     } else {
 263       ShouldNotReachHere();
 264     }
 265     current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
 266     _all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
 267 
 268     return false;
 269   }
 270 
 271   void print_summary_on(outputStream* out) {
 272     RegionTypeCounter* counters[] = { &_young, &_humonguous, &_free, &_old, NULL };
 273 
 274     out->print_cr("\n Current rem set statistics");
 275     out->print_cr("  Total per region rem sets sizes = " SIZE_FORMAT "K."
 276                   " Max = " SIZE_FORMAT "K.",
 277                   round_to_K(total_rs_mem_sz()), round_to_K(max_rs_mem_sz()));
 278     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 279       (*current)->print_rs_mem_info_on(out, total_rs_mem_sz());
 280     }
 281 
 282     out->print_cr("   Static structures = " SIZE_FORMAT "K,"
 283                   " free_lists = " SIZE_FORMAT "K.",
 284                   round_to_K(HeapRegionRemSet::static_mem_size()),
 285                   round_to_K(HeapRegionRemSet::fl_mem_size()));
 286 
 287     out->print_cr("    " SIZE_FORMAT " occupied cards represented.",
 288                   total_cards_occupied());
 289     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 290       (*current)->print_cards_occupied_info_on(out, total_cards_occupied());
 291     }
 292 
 293     // Largest sized rem set region statistics
 294     HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set();


 306                   round_to_K(max_code_root_rem_set->strong_code_roots_mem_size()));
 307     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 308       (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz());
 309     }
 310 
 311     out->print_cr("    " SIZE_FORMAT " code roots represented.",
 312                   total_code_root_elems());
 313     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 314       (*current)->print_code_root_elems_info_on(out, total_code_root_elems());
 315     }
 316 
 317     out->print_cr("    Region with largest amount of code roots = " HR_FORMAT ", "
 318                   "size = " SIZE_FORMAT "K, num_elems = " SIZE_FORMAT ".",
 319                   HR_FORMAT_PARAMS(max_code_root_mem_sz_region()),
 320                   round_to_K(max_code_root_rem_set->strong_code_roots_mem_size()),
 321                   round_to_K(max_code_root_rem_set->strong_code_roots_list_length()));
 322   }
 323 };
 324 
 325 void G1RemSetSummary::print_on(outputStream* out) {
 326   out->print_cr("\n Recent concurrent refinement statistics");
 327   out->print_cr("  Processed " SIZE_FORMAT " cards",
 328                 num_concurrent_refined_cards());
 329   out->print_cr("  Of " SIZE_FORMAT " completed buffers:", num_processed_buf_total());
 330   out->print_cr("     " SIZE_FORMAT_W(8) " (%5.1f%%) by concurrent RS threads.",
 331                 num_processed_buf_total(),
 332                 percent_of(num_processed_buf_rs_threads(), num_processed_buf_total()));
 333   out->print_cr("     " SIZE_FORMAT_W(8) " (%5.1f%%) by mutator threads.",
 334                 num_processed_buf_mutator(),
 335                 percent_of(num_processed_buf_mutator(), num_processed_buf_total()));
 336   out->print_cr("  Did " SIZE_FORMAT " coarsenings.", num_coarsenings());
 337   out->print_cr("  Concurrent RS threads times (s)");
 338   out->print("     ");
 339   for (uint i = 0; i < _num_vtimes; i++) {
 340     out->print("    %5.2f", rs_thread_vtime(i));
 341   }
 342   out->cr();
 343   out->print_cr("  Concurrent sampling threads times (s)");
 344   out->print_cr("         %5.2f", sampling_thread_vtime());
 345 
 346   HRRSStatsIter blk;


 254     if (r->is_free()) {
 255       current = &_free;
 256     } else if (r->is_young()) {
 257       current = &_young;
 258     } else if (r->is_humongous()) {
 259       current = &_humonguous;
 260     } else if (r->is_old()) {
 261       current = &_old;
 262     } else {
 263       ShouldNotReachHere();
 264     }
 265     current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
 266     _all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
 267 
 268     return false;
 269   }
 270 
 271   void print_summary_on(outputStream* out) {
 272     RegionTypeCounter* counters[] = { &_young, &_humonguous, &_free, &_old, NULL };
 273 
 274     out->print_cr(" Current rem set statistics");
 275     out->print_cr("  Total per region rem sets sizes = " SIZE_FORMAT "K."
 276                   " Max = " SIZE_FORMAT "K.",
 277                   round_to_K(total_rs_mem_sz()), round_to_K(max_rs_mem_sz()));
 278     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 279       (*current)->print_rs_mem_info_on(out, total_rs_mem_sz());
 280     }
 281 
 282     out->print_cr("   Static structures = " SIZE_FORMAT "K,"
 283                   " free_lists = " SIZE_FORMAT "K.",
 284                   round_to_K(HeapRegionRemSet::static_mem_size()),
 285                   round_to_K(HeapRegionRemSet::fl_mem_size()));
 286 
 287     out->print_cr("    " SIZE_FORMAT " occupied cards represented.",
 288                   total_cards_occupied());
 289     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 290       (*current)->print_cards_occupied_info_on(out, total_cards_occupied());
 291     }
 292 
 293     // Largest sized rem set region statistics
 294     HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set();


 306                   round_to_K(max_code_root_rem_set->strong_code_roots_mem_size()));
 307     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 308       (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz());
 309     }
 310 
 311     out->print_cr("    " SIZE_FORMAT " code roots represented.",
 312                   total_code_root_elems());
 313     for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
 314       (*current)->print_code_root_elems_info_on(out, total_code_root_elems());
 315     }
 316 
 317     out->print_cr("    Region with largest amount of code roots = " HR_FORMAT ", "
 318                   "size = " SIZE_FORMAT "K, num_elems = " SIZE_FORMAT ".",
 319                   HR_FORMAT_PARAMS(max_code_root_mem_sz_region()),
 320                   round_to_K(max_code_root_rem_set->strong_code_roots_mem_size()),
 321                   round_to_K(max_code_root_rem_set->strong_code_roots_list_length()));
 322   }
 323 };
 324 
 325 void G1RemSetSummary::print_on(outputStream* out) {
 326   out->print_cr(" Recent concurrent refinement statistics");
 327   out->print_cr("  Processed " SIZE_FORMAT " cards",
 328                 num_concurrent_refined_cards());
 329   out->print_cr("  Of " SIZE_FORMAT " completed buffers:", num_processed_buf_total());
 330   out->print_cr("     " SIZE_FORMAT_W(8) " (%5.1f%%) by concurrent RS threads.",
 331                 num_processed_buf_total(),
 332                 percent_of(num_processed_buf_rs_threads(), num_processed_buf_total()));
 333   out->print_cr("     " SIZE_FORMAT_W(8) " (%5.1f%%) by mutator threads.",
 334                 num_processed_buf_mutator(),
 335                 percent_of(num_processed_buf_mutator(), num_processed_buf_total()));
 336   out->print_cr("  Did " SIZE_FORMAT " coarsenings.", num_coarsenings());
 337   out->print_cr("  Concurrent RS threads times (s)");
 338   out->print("     ");
 339   for (uint i = 0; i < _num_vtimes; i++) {
 340     out->print("    %5.2f", rs_thread_vtime(i));
 341   }
 342   out->cr();
 343   out->print_cr("  Concurrent sampling threads times (s)");
 344   out->print_cr("         %5.2f", sampling_thread_vtime());
 345 
 346   HRRSStatsIter blk;
< prev index next >