< prev index next >

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

Print this page
rev 57544 : 8236485: Work-in-progress: Epoch synchronization protocol for G1 concurrent refinement
Reviewed-by:

*** 54,63 **** --- 54,72 ---- g1h->concurrent_refine()->threads_do(&collector); _total_mutator_refined_cards = G1BarrierSet::dirty_card_queue_set().total_mutator_refined_cards(); _num_coarsenings = HeapRegionRemSet::n_coarsenings(); set_sampling_thread_vtime(g1h->sampling_thread()->vtime_accum()); + + G1EpochSynchronizerCounters* sync_counters = g1h->concurrent_refine()->synchronizer_counters(); + _num_fast_sync = sync_counters->num_fast_sync(); + _num_no_handshake_sync = sync_counters->num_no_handshake_sync(); + _num_handshake_sync = sync_counters->num_handshake_sync(); + _no_handshake_accum_time_ms = TimeHelper::counter_to_millis(sync_counters->no_handshake_accum_time_counter()); + _handshake_accum_time_ms = TimeHelper::counter_to_millis(sync_counters->handshake_accum_time_counter()); + _num_handshake_no_safepoint = sync_counters->num_handshake_no_safepoint(); + _num_handshake_safepoint = sync_counters->num_handshake_safepoint(); } void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) { assert(_rs_threads_vtimes != NULL, "just checking"); assert(thread < _num_vtimes, "just checking");
*** 74,84 **** _total_mutator_refined_cards(0), _total_concurrent_refined_cards(0), _num_coarsenings(0), _num_vtimes(G1ConcurrentRefine::max_num_threads()), _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)), ! _sampling_thread_vtime(0.0f) { memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes); if (should_update) { update(); --- 83,100 ---- _total_mutator_refined_cards(0), _total_concurrent_refined_cards(0), _num_coarsenings(0), _num_vtimes(G1ConcurrentRefine::max_num_threads()), _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)), ! _sampling_thread_vtime(0.0f), ! _num_fast_sync(0), ! _num_no_handshake_sync(0), ! _num_handshake_sync(0), ! _no_handshake_accum_time_ms(0), ! _handshake_accum_time_ms(0), ! _num_handshake_no_safepoint(0), ! _num_handshake_safepoint(0) { memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes); if (should_update) { update();
*** 99,108 **** --- 115,132 ---- _num_coarsenings = other->num_coarsenings(); memcpy(_rs_threads_vtimes, other->_rs_threads_vtimes, sizeof(double) * _num_vtimes); set_sampling_thread_vtime(other->sampling_thread_vtime()); + + _num_fast_sync = other->num_fast_sync(); + _num_no_handshake_sync = other->num_no_handshake_sync(); + _num_handshake_sync = other->num_handshake_sync(); + _no_handshake_accum_time_ms = other->no_handshake_accum_time_ms(); + _handshake_accum_time_ms = other->handshake_accum_time_ms(); + _num_handshake_no_safepoint = other->num_handshake_no_safepoint(); + _num_handshake_safepoint = other->num_handshake_safepoint(); } void G1RemSetSummary::subtract_from(G1RemSetSummary* other) { assert(other != NULL, "just checking"); assert(_num_vtimes == other->_num_vtimes, "just checking");
*** 115,124 **** --- 139,156 ---- 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; + + _num_fast_sync = other->num_fast_sync() - _num_fast_sync; + _num_no_handshake_sync = other->num_no_handshake_sync() - _num_no_handshake_sync; + _num_handshake_sync = other->num_handshake_sync() - _num_handshake_sync; + _no_handshake_accum_time_ms = other->no_handshake_accum_time_ms() - _no_handshake_accum_time_ms; + _handshake_accum_time_ms = other->handshake_accum_time_ms() - _handshake_accum_time_ms; + _num_handshake_no_safepoint = other->num_handshake_no_safepoint() - _num_handshake_no_safepoint; + _num_handshake_safepoint = other->num_handshake_safepoint() - _num_handshake_safepoint; } class RegionTypeCounter { private: const char* _name;
*** 346,354 **** --- 378,396 ---- } out->cr(); out->print_cr(" Concurrent sampling threads times (s)"); out->print_cr(" %5.2f", sampling_thread_vtime()); + out->print_cr(" Epoch synchronization statistics"); + out->print_cr(" fastpath no-handshake(time (ms)) handshake(time (ms)) no_safepoint/safepoint"); + out->print_cr(" " SIZE_FORMAT_W(8) " " SIZE_FORMAT_W(12) "(" SIZE_FORMAT_W(9) + ") " SIZE_FORMAT_W(9) "(" SIZE_FORMAT_W(9) ") " + SIZE_FORMAT_W(12) "/" SIZE_FORMAT_W(9), + num_fast_sync(), + num_no_handshake_sync(), no_handshake_accum_time_ms(), + num_handshake_sync(), handshake_accum_time_ms(), + num_handshake_no_safepoint(), num_handshake_safepoint()); + HRRSStatsIter blk; G1CollectedHeap::heap()->heap_region_iterate(&blk); blk.print_summary_on(out); }
< prev index next >