Skip to content

Commit ed05430

Browse files
committed
Consolidate rename src,dst -> staging,active
1 parent 251f0b4 commit ed05430

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

erts/emulator/beam/beam_bp.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,39 +1574,39 @@ static void collect_timem_info(BpTimemTrace* bdt,
15741574
void erts_timem_info_consolidate()
15751575
{
15761576
FinishTimemInfo *fin = &finish_timem_info;
1577-
GenericBpData *src_bp = &fin->g->data[erts_staging_bp_ix()];
1578-
GenericBpData *dst_bp = &fin->g->data[erts_active_bp_ix()];
1577+
GenericBpData *staging = &fin->g->data[erts_staging_bp_ix()];
1578+
GenericBpData *active = &fin->g->data[erts_active_bp_ix()];
15791579
const Uint32 dirty_thr_ix = (Uint32) erts_no_schedulers;
15801580

15811581
ERTS_LC_ASSERT(erts_has_code_mod_permission());
1582-
ASSERT(src_bp->flags == dst_bp->flags);
1583-
ASSERT(src_bp->flags & (ERTS_BPF_TIME_TRACE_ACTIVE | ERTS_BPF_MEM_TRACE_ACTIVE));
1582+
ASSERT(staging->flags == active->flags);
1583+
ASSERT(staging->flags & (ERTS_BPF_TIME_TRACE_ACTIVE | ERTS_BPF_MEM_TRACE_ACTIVE));
15841584

15851585
/*
1586-
* We use the *active* hash for dirty schedulers to receive the
1586+
* We use the active hash for dirty schedulers to receive the
15871587
* accumulations that happenend during the trace_info call. It's safe as
1588-
* it's lock protected. Another solution would be to have a dedicated
1589-
* consolidation hash to avoid the locking here.
1588+
* it's lock protected. Another solution could be to have a dedicated
1589+
* consolidation hash index to avoid the locking here.
15901590
*/
15911591
erts_mtx_lock(&erts_dirty_bp_ix_mtx);
15921592

15931593
if (fin->break_flags & ERTS_BPF_TIME_TRACE_ACTIVE) {
1594-
ASSERT(src_bp->flags & ERTS_BPF_TIME_TRACE_ACTIVE);
1595-
collect_timem_info(src_bp->time,
1596-
&(dst_bp->time->threads[dirty_thr_ix]));
1594+
ASSERT(staging->flags & ERTS_BPF_TIME_TRACE_ACTIVE);
1595+
collect_timem_info(staging->time,
1596+
&(active->time->threads[dirty_thr_ix]));
15971597

1598-
bp_calltrace_unref(src_bp->time);
1599-
src_bp->time = dst_bp->time;
1600-
erts_refc_inc(&src_bp->time->refc, 2);
1598+
bp_calltrace_unref(staging->time);
1599+
staging->time = active->time;
1600+
erts_refc_inc(&staging->time->refc, 2);
16011601
}
16021602
if (fin->break_flags & ERTS_BPF_MEM_TRACE_ACTIVE) {
1603-
ASSERT(src_bp->flags & ERTS_BPF_MEM_TRACE_ACTIVE);
1604-
collect_timem_info(src_bp->memory,
1605-
&(dst_bp->memory->threads[dirty_thr_ix]));
1603+
ASSERT(staging->flags & ERTS_BPF_MEM_TRACE_ACTIVE);
1604+
collect_timem_info(staging->memory,
1605+
&(active->memory->threads[dirty_thr_ix]));
16061606

1607-
bp_calltrace_unref(src_bp->memory);
1608-
src_bp->memory = dst_bp->memory;
1609-
erts_refc_inc(&src_bp->memory->refc, 2);
1607+
bp_calltrace_unref(staging->memory);
1608+
staging->memory = active->memory;
1609+
erts_refc_inc(&staging->memory->refc, 2);
16101610
}
16111611
erts_mtx_unlock(&erts_dirty_bp_ix_mtx);
16121612
}

0 commit comments

Comments
 (0)