Wladimir J. van der Laan
d0c37ee789
Merge #10383 : [logging] log system time and mock time
...
761392d
[logging] log system time and mock time (John Newbery)
Tree-SHA512: 0a4b3ad74bcac201be490fe12e4b45adeabc39030ac46f40e1aeb2a20b2f3963e4468e65798d8aaeca1818759cab55ff2b2aa214500aa11571492c3301dd31c1
2017-05-16 08:10:05 +02:00
John Newbery
761392db3a
[logging] log system time and mock time
2017-05-10 15:49:00 -04:00
Jorge Timón
52922456b8
Util: Put mapMultiArgs inside ArgsManager
...
- Set ArgsManager::mapMultiArgs in ArgsManager::SoftSetArg, ForceSetArg, SoftSetBoolArg
2017-05-09 21:37:29 +02:00
Jorge Timón
f2957ce6cd
Util: Create ArgsManager class...
...
- Introduce ArgsManager::GetArgs()
- Adapt util_tests.cpp to ArgsManager
2017-05-09 21:29:02 +02:00
fanquake
93dbb15954
Remove Clang workaround for Boost 1.46
2017-04-25 09:16:57 +08:00
John Newbery
7fd50c3b70
allow libevent logging to be updated during runtime
2017-04-10 17:05:59 -04:00
John Newbery
5255aca3f4
[rpc] Add logging RPC
...
Adds an RPC to get and set currently active logging categories.
2017-04-10 17:05:59 -04:00
Wladimir J. van der Laan
f110272dc9
Remove namespace fs=fs
...
Having these inside functions is silly and redundant now.
2017-04-03 12:33:14 +02:00
Wladimir J. van der Laan
2a5f574762
Use fsbridge for fopen and freopen
...
Abstracts away how a path is opened to a `FILE*`.
Reduces the number of places where path is converted to a string
for anything else but printing.
2017-04-03 12:32:32 +02:00
Wladimir J. van der Laan
bac5c9cf64
Replace uses of boost::filesystem with fs
...
Step two in abstracting away boost::filesystem.
To repeat this, simply run:
```
git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g'
```
2017-04-03 12:32:32 +02:00
Wladimir J. van der Laan
7d5172d354
Replace includes of boost/filesystem.h with fs.h
...
This is step one in abstracting the use of boost::filesystem.
2017-04-03 12:32:32 +02:00
Wladimir J. van der Laan
a2cd0b0eec
Merge #10058 : No need to use OpenSSL malloc/free
...
6d5dd60
No need to use OpenSSL malloc/free (Thomas Snider)
Tree-SHA512: 29f790067ffd5a10a8e1a621318a0ba445691f57c804aa3b7c8ca372c8408d8c7fe703c42b48018e400fc32e3feff5ab401d97433910ce2c50e69da0b8a6662e
2017-04-03 12:06:02 +02:00
Gregory Maxwell
6b3bb3d9ba
Change LogAcceptCategory to use uint32_t rather than sets of strings.
...
This changes the logging categories to boolean flags instead of strings.
This simplifies the acceptance testing by avoiding accessing a scoped
static thread local pointer to a thread local set of strings. It
eliminates the only use of boost::thread_specific_ptr outside of
lockorder debugging.
This change allows log entries to be directed to multiple categories
and makes it easy to change the logging flags at runtime (e.g. via
an RPC, though that isn't done by this commit.)
It also eliminates the fDebug global.
Configuration of unknown logging categories now produces a warning.
2017-04-01 18:53:29 +00:00
Wladimir J. van der Laan
625488ace5
util: Work around (virtual) memory exhaustion on 32-bit w/ glibc
...
glibc-specific: On 32-bit systems set the number of arenas to 1. By
default, since glibc 2.10, the C library will create up to two heap
arenas per core. This is known to cause excessive virtual address space
usage in our usage. Work around it by setting the maximum number of
arenas to 1.
2017-03-30 09:45:41 +02:00
Thomas Snider
6d5dd60c88
No need to use OpenSSL malloc/free
2017-03-28 17:36:31 -07:00
practicalswift
53a2ba351a
[util] Remove redundant call to get() on smart pointer (thread_specific_ptr)
2017-03-09 10:22:35 +01:00
Karl-Johan Alm
a57845c20e
Refactor: Remove using namespace <xxx> from util*
2017-03-08 08:47:02 -08:00
kirit93
40f11f8872
Fix for issue #9775 . Added check for open() returning a NULL pointer.
2017-02-20 23:53:18 +05:30
Alex Morcos
29fb311858
Increase minimum debug.log size to 10MB after shrink.
2017-01-24 20:28:00 -05:00
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Matt Corallo
c2f61bebb1
Add a ForceSetArg method for testing
2016-12-27 13:52:07 +01:00
Matt Corallo
4e048142a5
Lock mapArgs/mapMultiArgs access in util
2016-12-24 11:29:33 -05:00
Matt Corallo
4cd373aea8
Un-expose mapArgs from utils.h
2016-12-24 11:29:33 -05:00
Matt Corallo
0cf86a6678
Introduce (and use) an IsArgSet accessor method
2016-12-23 21:30:16 -05:00
Matt Corallo
2b5f085ad1
Fix non-const mapMultiArgs[] access after init.
...
Swap mapMultiArgs for a const-reference to a _mapMultiArgs which is
only accessed in util.cpp
2016-12-23 21:30:15 -05:00
Matt Corallo
c8042a48f0
Remove arguments to ParseConfigFile
2016-12-23 21:30:15 -05:00
Wladimir J. van der Laan
7f72568e6b
Merge #9236 : Fix races for strMiscWarning and fLargeWork*Found, make QT runawayException use GetWarnings
...
749be01
Move GetWarnings() into its own file. (Gregory Maxwell)
e3ba0ef
Eliminate data races for strMiscWarning and fLargeWork*Found. (Gregory Maxwell)
c63198f
Make QT runawayException call GetWarnings instead of directly access strMiscWarning. (Gregory Maxwell)
2016-12-19 12:40:01 +01:00
Karl-Johan Alm
8c1dbc5e9d
Refactor: Removed begin/end_ptr functions.
2016-12-09 13:15:19 +09:00
Gregory Maxwell
749be013f5
Move GetWarnings() into its own file.
2016-12-03 07:17:34 +00:00
Gregory Maxwell
e3ba0ef956
Eliminate data races for strMiscWarning and fLargeWork*Found.
...
This moves all access to these datastructures through accessor functions
and protects them with a lock.
2016-12-03 07:17:34 +00:00
Gregory Maxwell
c63198f1c7
Make QT runawayException call GetWarnings instead of directly access strMiscWarning.
...
This is a first step in avoiding racy accesses to strMiscWarning.
The change required moving GetWarnings and related globals to util.
2016-12-03 07:17:28 +00:00
Wladimir J. van der Laan
c79e52ad30
Merge #9230 : Fix some benign races in timestamp logging
...
8b22efb
Make fStartedNewLine an std::atomic_bool (Matt Corallo)
507145d
Fix race when accessing std::locale::classic() (Matt Corallo)
2016-12-01 11:47:47 +01:00
Wladimir J. van der Laan
deec83fd2c
init: Get rid of fServer flag
...
There is no need to store this flag globally, the variable is only used
inside the initialization process.
Thanks to Alex Morcos for the idea.
2016-11-29 12:47:13 +01:00
Matt Corallo
8b22efb6f7
Make fStartedNewLine an std::atomic_bool
...
While this doesnt really fix the race of adding timestamps
mid-logical-line, it avoids the undefined behavior of using a
bool in multiple threads.
2016-11-27 15:36:44 -08:00
Jorge Timón
3450c18a12
Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs
2016-10-01 08:12:19 +02:00
Wladimir J. van der Laan
cf5ebaa921
Merge #8656 : Trivial: Do not shadow global variable fileout
...
7c069a7
Do not shadow global variable (Pavel Janík)
2016-09-21 14:13:44 +02:00
mruddy
ff2ed7a5bc
trivial: remove unnecessary variable fDaemon
2016-09-04 11:42:07 -04:00
Pavel Janík
7c069a7093
Do not shadow global variable
2016-09-02 20:50:59 +02:00
MarcoFalke
33336e1aac
[util] CopyrightHolders: Check for untranslated substitution
...
Also, remove check which is always true
2016-07-02 10:46:26 +02:00
Pieter Wuille
a886dbf8e7
Use std::atomic for fRequestShutdown and fReopenDebugLog
2016-06-01 19:18:25 +02:00
Wladimir J. van der Laan
2efe38b832
Merge #8004 : signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
...
3262316
fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (Chirag Davé)
2016-05-12 11:46:10 +02:00
Chirag Davé
326231611b
fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
...
This allows access as an atomic variable in the presence
of async interrupts.
See issue #7433 for more details
fixes : #7433
2016-05-09 08:20:58 -07:00
Kaz Wesley
e53e7c5473
don't run ThreadMessageHandler at lowered priority
...
There's no clear reason ThreadMessageHandler should be low priority.
Fixes #8010 (priority inversion).
2016-05-05 13:25:35 -07:00
Alexander Regueiro
41dbc4849e
Removed call to TryCreateDirectory
from GetDefaultDataDir
in src/util.cpp
.
...
See https://github.com/bitcoin/bitcoin/issues/7845#issuecomment-207684728 .
Also refactored `GetDefaultDataDir` function to return path for Mac in one expression.
2016-04-13 00:11:47 +01:00
Mustafa
2fdaa25529
Move GetTempPath() to testutil.
2016-03-11 15:04:05 +00:00
Luke Dashjr
a68bb9f5e7
Merge branch 'master' into single_prodname
2016-02-03 05:41:13 +00:00
Luke Dashjr
027fdb83b4
When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen
2016-02-03 05:38:51 +00:00
Luke Dashjr
3cae14056a
Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere
2016-01-19 08:42:05 +00:00
Luke Dashjr
917b1d03cf
Set copyright holders displayed in notices separately from the package name
...
This helps avoid accidental removal of upstream copyright names
2015-12-22 12:29:18 +00:00
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
2015-12-13 18:08:39 +01:00