tracing: utxocache tracepoints
Summary:
The tracepoints are further documented in docs/tracing.md and the usage is shown via the two newly added example scripts in contrib/tracing/.
Backport of core#22902.
Backport of core#23907.
Notes:
- The amount is passed as string because our type can't be converted to int
- CTxOut and CCoin accessors are used where applicable
- I removed the casts that are both useless and even mixing stding and posix types
Test Plan:
Build with tracing, run bitcoind, then:
sudo ../contrib/tracing/log_utxocache_flush.py ./src/bitcoind sudo bpftrace ../contrib/tracing/log_utxos.bt
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D12715