aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-02-20 11:25:56 +0000
committerfanquake <fanquake@gmail.com>2022-02-20 11:27:54 +0000
commit2b0735d183111a4e40c0d188bc91d0539faca5b7 (patch)
treebe544ff3dc9c263a44c42c274f80be02c7dc03d5 /src
parent98b9d607a8c235bb44efc8d205d0bfba3bd2a3ab (diff)
parent799968e8b38833dc7fd7b6d488a66a14580ef674 (diff)
downloadbitcoin-2b0735d183111a4e40c0d188bc91d0539faca5b7.tar.xz
Merge bitcoin/bitcoin#23907: tracing: utxocache tracepoints follow up for #22902
799968e8b38833dc7fd7b6d488a66a14580ef674 tracing: misc follow-ups to 22902 (0xb10c) 36a65847033540cf2203252c7baf42bc5ec97579 tracing: correctly scope utxocache:flush tracepoint (Arnab Sen) Pull request description: This PR is a follow-up to the [#22902](https://github.com/bitcoin/bitcoin/pull/22902). Previously, the tracepoint `utxocache:flush` was called, even when it was not flushing. So, the tracepoint is now scoped to write only when coins cache to disk. ACKs for top commit: 0xB10C: ACK 799968e8b38833dc7fd7b6d488a66a14580ef674 Tree-SHA512: ebb096cbf991c551c81e4339821f10d9768c14cf3d8cb14d0ad851acff5980962228a1c746914c6aba3bdb27e8be53b33349c41efe8bab5542f639916e437b5f
Diffstat (limited to 'src')
-rw-r--r--src/validation.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 5b52638fc5..2813b62462 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2373,14 +2373,13 @@ bool CChainState::FlushStateToDisk(
return AbortNode(state, "Failed to write to coin database");
nLastFlush = nNow;
full_flush_completed = true;
+ TRACE5(utxocache, flush,
+ (int64_t)(GetTimeMicros() - nNow.count()), // in microseconds (µs)
+ (u_int32_t)mode,
+ (u_int64_t)coins_count,
+ (u_int64_t)coins_mem_usage,
+ (bool)fFlushForPrune);
}
- TRACE6(utxocache, flush,
- (int64_t)(GetTimeMicros() - nNow.count()), // in microseconds (µs)
- (u_int32_t)mode,
- (u_int64_t)coins_count,
- (u_int64_t)coins_mem_usage,
- (bool)fFlushForPrune,
- (bool)fDoFullFlush);
}
if (full_flush_completed) {
// Update best block in wallet (so we can detect restored wallets).