void G1RemSetSummary::subtract_from(G1RemSetSummary* other) { assert(other != NULL, "just checking"); assert(remset() == other->remset(), "just checking"); assert(_num_vtimes == other->_num_vtimes, "just checking"); _num_refined_cards = other->num_concurrent_refined_cards() - _num_refined_cards; _num_processed_buf_mutator = other->num_processed_buf_mutator() - _num_processed_buf_mutator; _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads() - _num_processed_buf_rs_threads; _num_coarsenings = other->num_coarsenings() - _num_coarsenings; for (uint i = 0; i < _num_vtimes; i++) { set_rs_thread_vtime(i, other->rs_thread_vtime(i) - rs_thread_vtime(i)); } _sampling_thread_vtime = other->sampling_thread_vtime() - _sampling_thread_vtime; }
void G1RemSetSummary::print_on(outputStream* out) { out->print_cr("\n Concurrent RS processed "SIZE_FORMAT" cards", num_concurrent_refined_cards()); out->print_cr(" Of %d completed buffers:", num_processed_buf_total()); out->print_cr(" %8d (%5.1f%%) by concurrent RS threads.", num_processed_buf_total(), calc_percentage(num_processed_buf_rs_threads(), num_processed_buf_total())); out->print_cr(" %8d (%5.1f%%) by mutator threads.", num_processed_buf_mutator(), calc_percentage(num_processed_buf_mutator(), num_processed_buf_total())); out->print_cr(" Concurrent RS threads times (s)"); out->print(" "); for (uint i = 0; i < _num_vtimes; i++) { out->print(" %5.2f", rs_thread_vtime(i)); } out->cr(); out->print_cr(" Concurrent sampling threads times (s)"); out->print_cr(" %5.2f", sampling_thread_vtime()); HRRSStatsIter blk; G1CollectedHeap::heap()->heap_region_iterate(&blk); out->print_cr(" Total heap region rem set sizes = "SIZE_FORMAT"K." " Max = "SIZE_FORMAT"K.", blk.total_mem_sz()/K, blk.max_mem_sz()/K); out->print_cr(" Static structures = "SIZE_FORMAT"K," " free_lists = "SIZE_FORMAT"K.", HeapRegionRemSet::static_mem_size() / K, HeapRegionRemSet::fl_mem_size() / K); out->print_cr(" "SIZE_FORMAT" occupied cards represented.", blk.occupied()); HeapRegion* max_mem_sz_region = blk.max_mem_sz_region(); HeapRegionRemSet* rem_set = max_mem_sz_region->rem_set(); out->print_cr(" Max size region = "HR_FORMAT", " "size = "SIZE_FORMAT "K, occupied = "SIZE_FORMAT"K.", HR_FORMAT_PARAMS(max_mem_sz_region), (rem_set->mem_size() + K - 1)/K, (rem_set->occupied() + K - 1)/K); out->print_cr(" Did %d coarsenings.", num_coarsenings()); }