mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Merge bitcoin/bitcoin#22904: sync, log: inline lock contention logging macro to fix duration, improve BCLog::LogMsg()
f530202353Make unexpected time type in BCLog::LogMsg() a compile-time error (Martin Ankerl)bddae7e7ffAdd util/types.h with ALWAYS_FALSE template (MarcoFalke)498b323425log, timer: improve BCLog::LogMsg() (Jon Atack)8d2f847ed9sync: inline lock contention logging macro to fix time duration (Jon Atack) Pull request description: Follow-up to #22736. The first commit addresses the issue identified and reported by Martin Ankerl in https://github.com/bitcoin/bitcoin/pull/22736#discussion_r703019629 to fix the lock contention duration reporting. The next three commits make improvements to the timer code in `BCLog::LogMsg()` and add `util/types.h` with an `ALWAYS_FALSE` template, that springboard from https://github.com/bitcoin/bitcoin/pull/22736#discussion_r702747920 by Marco Falke. ACKs for top commit: martinus: re-ACKf530202353. I ran a fully synced node for about a day. My node was mostly idle though so not much was going on. I [wrote a little script](https://github.com/martinus/bitcoin-stuff/blob/main/scripts/parse-debuglog-contention-single.rb) to parse the `debug.log` and summarize the output to see if anything interesting was going on, here is the result: theStack: ACKf530202353Tree-SHA512: 37d093eac5590e1b5846ab5994d0950d71e131177d1afe4a5f7fcd614270f977e0ea117e7af788e9a74ddcccab35b42ec8fa4db3a3378940d4988df7d21cdaaa
This commit is contained in:
11
src/util/types.h
Normal file
11
src/util/types.h
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (c) 2021 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_UTIL_TYPES_H
|
||||
#define BITCOIN_UTIL_TYPES_H
|
||||
|
||||
template <class>
|
||||
inline constexpr bool ALWAYS_FALSE{false};
|
||||
|
||||
#endif // BITCOIN_UTIL_TYPES_H
|
||||
Reference in New Issue
Block a user