< prev index next >

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

Print this page




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


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


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


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