Util ports#197
Merged
Merged
Conversation
…r options Most people expect a value of 1 to enable all for command line arguments. However to do this for the -debug option you must type "-debug=". This has been changed to allow "-debug=1" as well as "-debug=" to enable all debug logging
To determine the default for `-par`, the number of script verification threads, use [boost::thread::physical_concurrency()](http://www.boost.org/doc/libs/1_58_0/doc/html/thread/thread_management.html#thread.thread_management.thread.physical_concurrency) which counts only physical cores, not virtual cores. Virtual cores are roughly a set of cached registers to avoid context switches while threading, they cannot actually perform work, so spawning a verification thread for them could even reduce efficiency and will put undue load on the system. Should fix issue #6358, as well as some other reported system overload issues, especially on Intel processors. The function was only introduced in boost 1.56, so provide a utility function `GetNumCores` to fall back for older Boost versions. Conflicts: src/init.cpp src/miner.cpp
Prevents stomping on debug logs in datadirs that are locked by other instances and lost parameter interaction messages that can get wiped by ShrinkDebugFile(). The log is now opened explicitly and all emitted messages are buffered until this open occurs. The version message and log cut have also been moved to the earliest possible sensible location. Conflicts: src/init.cpp
`bitcoind -X -noX` ends up, unintuitively, with `X` set. (for all boolean options X) This result is due to the odd two-pass processing of arguments. This patch fixes this oddity and simplifies the code at the same time. Conflicts: src/util.cpp
Fixes #6809 - run-of-the-mill exceptions should not get into strMiscWarning (which is reported by `getinfo`).
Conflicts: src/Makefile.test.include src/test/alert_tests.cpp src/test/test_bitcoin.cpp src/test/testutil.cpp src/test/testutil.h src/util.cpp
Now that we started using c++11, force use of variadic templates. The autodetection may be wonky on some compilers, see discussion [here](bitcoin/bitcoin#7982 (comment)) and is unnecessary for us anyhow.
There's no clear reason ThreadMessageHandler should be low priority. Fixes #8010 (priority inversion). Note from cherry-picker: This commit originally removed SetThreadPriority from util.cpp. We're keeping this function for the internal miner. Conflicts: src/util.cpp
Conflicts: src/init.cpp src/util.cpp src/util.h
Member
|
utACK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Misc PRs from Core related to util.cpp/util.h
bitcoin/bitcoin#6164 - Allow user to use -debug=1 to enable all debugging
bitcoin/bitcoin#6361 - Use real number of cores for default -par, ignore virtual cores
bitcoin/bitcoin#6149 - Buffer log messages and explicitly open logs
bitcoin/bitcoin#6438 - openssl: avoid config file load/race
bitcoin/bitcoin#6284 - Fix argument parsing oddity with -noX
bitcoin/bitcoin#6742 - Changed logging to make -logtimestamps to work also for -printtoconsole
bitcoin/bitcoin#7114 - util: Don't set strMiscWarning on every exception
bitcoin/bitcoin#7667 - Move GetTempPath() to testutil
bitcoin/bitcoin#8000 - tinyformat: force USE_VARIADIC_TEMPLATES
bitcoin/bitcoin#8011 - don't run ThreadMessageHandler at lowered priority
bitcoin/bitcoin#8123 - Use std::atomic for fRequestShutdown and fReopenDebugLog