[tracing] tracepoint for utxocache flushes

Signed-off-by: Arnab Sen <arnabsen1729@gmail.com>
This commit is contained in:
Arnab Sen
2021-09-03 18:46:13 +05:30
parent 4f8b1f8759
commit a26e8eef43
3 changed files with 129 additions and 0 deletions

View File

@@ -108,6 +108,22 @@ Arguments passed:
5. SigOps in the Block (excluding coinbase SigOps) `uint64`
6. Time it took to connect the Block in microseconds (µs) as `uint64`
### Context `utxocache`
#### Tracepoint `utxocache:flush`
Is called *after* the caches and indexes are flushed depending on the mode
`CChainState::FlushStateToDisk` is called with.
Arguments passed:
1. Duration in microseconds as `int64`
2. Flush state mode as `uint32`. It's an enumerator class with values `0`
(`NONE`), `1` (`IF_NEEDED`), `2` (`PERIODIC`), `3` (`ALWAYS`)
3. Number of coins flushed as `uint64`
4. Memory usage in bytes as `uint64`
5. If the flush was pruned as `bool`
6. If it was full flush as `bool`
## Adding tracepoints to Bitcoin Core
To add a new tracepoint, `#include <util/trace.h>` in the compilation unit where