Page MenuHomePhabricator

tracing: correctly scope utxocache:flush tracepoint
ClosedPublic

Authored by PiRK on Sep 16 2025, 12:25.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6b1f6481a8de: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable