src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
Print this page
rev 6327 : 8019342: G1: High "Other" time most likely due to card redirtying
Summary: Parallelize card redirtying to decrease the time it takes.
Reviewed-by: brutisso
*** 171,180 ****
--- 171,182 ----
_last_termination_times_ms(_max_gc_threads, "%.1lf"),
_last_termination_attempts(_max_gc_threads, SIZE_FORMAT),
_last_gc_worker_end_times_ms(_max_gc_threads, "%.1lf", false),
_last_gc_worker_times_ms(_max_gc_threads, "%.1lf"),
_last_gc_worker_other_times_ms(_max_gc_threads, "%.1lf"),
+ _last_redirty_logged_cards_time_ms(_max_gc_threads, "%.1lf"),
+ _last_redirty_logged_cards_processed_cards(_max_gc_threads, SIZE_FORMAT),
_cur_string_dedup_queue_fixup_worker_times_ms(_max_gc_threads, "%.1lf"),
_cur_string_dedup_table_fixup_worker_times_ms(_max_gc_threads, "%.1lf")
{
assert(max_gc_threads > 0, "Must have some GC threads");
}
*** 196,205 ****
--- 198,211 ----
_last_termination_times_ms.reset();
_last_termination_attempts.reset();
_last_gc_worker_end_times_ms.reset();
_last_gc_worker_times_ms.reset();
_last_gc_worker_other_times_ms.reset();
+
+ _last_redirty_logged_cards_time_ms.reset();
+ _last_redirty_logged_cards_processed_cards.reset();
+
}
void G1GCPhaseTimes::note_gc_end() {
_last_gc_worker_start_times_ms.verify();
_last_ext_root_scan_times_ms.verify();
*** 231,240 ****
--- 237,249 ----
_last_gc_worker_other_times_ms.set(i, worker_other_time);
}
_last_gc_worker_times_ms.verify();
_last_gc_worker_other_times_ms.verify();
+
+ _last_redirty_logged_cards_time_ms.verify();
+ _last_redirty_logged_cards_processed_cards.verify();
}
void G1GCPhaseTimes::note_string_dedup_fixup_start() {
_cur_string_dedup_queue_fixup_worker_times_ms.reset();
_cur_string_dedup_table_fixup_worker_times_ms.reset();
*** 350,359 ****
--- 359,372 ----
_recorded_non_young_cset_choice_time_ms));
print_stats(2, "Ref Proc", _cur_ref_proc_time_ms);
print_stats(2, "Ref Enq", _cur_ref_enq_time_ms);
if (G1DeferredRSUpdate) {
print_stats(2, "Redirty Cards", _recorded_redirty_logged_cards_time_ms);
+ if (G1Log::finest()) {
+ _last_redirty_logged_cards_time_ms.print(3, "Parallel Redirty");
+ _last_redirty_logged_cards_processed_cards.print(3, "Redirtied Cards");
+ }
}
print_stats(2, "Free CSet",
(_recorded_young_free_cset_time_ms +
_recorded_non_young_free_cset_time_ms));
if (G1Log::finest()) {