Skip to content
Permalink
Browse files
8278277: G1: Simplify implementation of G1GCPhaseTimes::record_or_add…
…_time_secs

Reviewed-by: iwalulya, sjohanss, tschatzl
  • Loading branch information
Hamlin Li committed Dec 6, 2021
1 parent d14f06a commit 286a26c36600ed82726f1678194363b2828851dd
Showing with 1 addition and 5 deletions.
  1. +1 −5 src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
@@ -266,11 +266,7 @@ void G1GCPhaseTimes::add_time_secs(GCParPhases phase, uint worker_id, double sec
}

void G1GCPhaseTimes::record_or_add_time_secs(GCParPhases phase, uint worker_id, double secs) {
if (_gc_par_phases[phase]->get(worker_id) == _gc_par_phases[phase]->uninitialized()) {
record_time_secs(phase, worker_id, secs);
} else {
add_time_secs(phase, worker_id, secs);
}
_gc_par_phases[phase]->set_or_add(worker_id, secs);
}

double G1GCPhaseTimes::get_time_secs(GCParPhases phase, uint worker_id) {

1 comment on commit 286a26c

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 286a26c Dec 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.