HomePhabricator

tracing: correctly scope utxocache:flush tracepoint

Description

tracing: correctly scope utxocache:flush tracepoint

Summary:
Previously, the utxocache:flush tracepoint was in the wrong scope and
reached every time CChainState::FlushStateToDisk was called, even when
there was no flushing of the cache. The tracepoint is now properly scoped
and will be reached during a full flush.

This concludes backport of core#23907
https://github.com/bitcoin/bitcoin/pull/23907/commits/36a65847033540cf2203252c7baf42bc5ec97579

The rest of the backport was already done in D12715.

Test Plan:
Run a reindex with tracing enabled and with a small dbcache (to trigger frequent flushes):

cmake -GNinja .. -DENABLE_TRACING=ON
ninja
./src/bitcoind -daemon -dbcache=100 -reindex-chainstate -datadir=/data0/ecashd_test
sudo ../contrib/tracing/log_utxocache_flush.py ./src/bitcoind
sudo bpftrace ../contrib/tracing/log_utxos.bt

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18636

Details

Provenance
Arnab Sen <arnabsen1729@gmail.com>Authored on Dec 22 2021, 06:27
PiRKCommitted on Sep 16 2025, 13:24
PiRKPushed on Sep 16 2025, 13:24
Reviewer
Restricted Project
Differential Revision
D18636: tracing: correctly scope utxocache:flush tracepoint
Parents
rABC0a0ef997f597: [Cashtab] Lose debug logs in App tests
Branches
Unknown
Tags
Unknown