Skip to content

Commit

Permalink
8344798: Shenandoah: Use more descriptive variable names in shPhaseTi…
Browse files Browse the repository at this point in the history
…mings.cpp

Reviewed-by: ysr
  • Loading branch information
William Kemper committed Nov 22, 2024
1 parent c199f53 commit db44e97
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,33 +185,33 @@ void ShenandoahPhaseTimings::flush_par_workers_to_cycle() {
for (uint pi = 0; pi < _num_phases; pi++) {
Phase phase = Phase(pi);
if (is_worker_phase(phase)) {
double s = uninitialized();
double sum = uninitialized();
for (uint i = 1; i < _num_par_phases; i++) {
ShenandoahWorkerData* wd = worker_data(phase, ParPhase(i));
double ws = uninitialized();
double worker_sum = uninitialized();
for (uint c = 0; c < _max_workers; c++) {
double v = wd->get(c);
if (v != ShenandoahWorkerData::uninitialized()) {
if (ws == uninitialized()) {
ws = v;
double worker_time = wd->get(c);
if (worker_time != ShenandoahWorkerData::uninitialized()) {
if (worker_sum == uninitialized()) {
worker_sum = worker_time;
} else {
ws += v;
worker_sum += worker_time;
}
}
}
if (ws != uninitialized()) {
if (worker_sum != uninitialized()) {
// add to each line in phase
set_cycle_data(Phase(phase + i + 1), ws);
if (s == uninitialized()) {
s = ws;
set_cycle_data(Phase(phase + i + 1), worker_sum);
if (sum == uninitialized()) {
sum = worker_sum;
} else {
s += ws;
sum += worker_sum;
}
}
}
if (s != uninitialized()) {
if (sum != uninitialized()) {
// add to total for phase
set_cycle_data(Phase(phase + 1), s);
set_cycle_data(Phase(phase + 1), sum);
}
}
}
Expand Down

0 comments on commit db44e97

Please sign in to comment.