laanwj
commented at 10:46 am on May 2, 2020:
member
This replaces the only use of thread_local with a mutex-protected map.
This leaks per thread, but because bitcoin’s threads are static and permanent, this is not a problem in practice. Add a note to the thread rename function to only call it for permanent threads, just in case.
Also removes associated build system functionality.
fanquake added the label
Utils/log/libs
on May 2, 2020
refactor: Replace thread_local use with a mutex-protected map
This replaces the only use of `thread_local` with a mutex-protected map.
This leaks per thread, but because bitcoin's threads are static and
permanent, this is not a problem in practice. Add a note to the thread
rename function to only call it for permanent threads, just in case.
Also removes associated build system functionality.
Closes #18678.
c7933899e9
laanwj force-pushed
on May 2, 2020
meshcollider
commented at 11:20 am on May 2, 2020:
contributor
Concept / code review ACKc7933899e93b38f444d87b12858fd5a124f2066c modulo someone testing that it does fix the performance issue linked
MarcoFalke
commented at 11:47 am on May 2, 2020:
member
Concept ACK if this fixes the problem. Will test when my new hardware arrives
laanwj
commented at 11:57 am on May 2, 2020:
member
If this doesn’t solve the problem, then the problem isn’t thread_local but looking up thread names in the first place, and we should remove thread name logging completely (as well as thread_local).
A workaround then that would avoid the need for this bookkeeping at all would be:
Log thread names once with their associated ID after creation on thread name setting
Log thread IDs instead of names in log messages
DrahtBot
commented at 12:27 pm on May 2, 2020:
member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
hebasto
commented at 7:18 pm on May 2, 2020:
member
Concept ACK. Keep testing.
hebasto
commented at 8:40 pm on May 2, 2020:
member
DrahtBot removed the label
Needs gitian build
on May 4, 2020
laanwj
commented at 1:18 pm on May 4, 2020:
member
Okay. So is it still worth keeping this open? It would make thread-name logging work in the gitian-built binaries which lack thread_local. And cleans up the build system a bit.
hebasto
commented at 1:20 pm on May 4, 2020:
member
It would make thread-name logging work in the gitian-built binaries which lack thread_local. And cleans up the build system a bit.
Correct. So keep reviewing.
MarcoFalke
commented at 1:32 pm on May 4, 2020:
member
I am currently syncing a node to debug this issue.
Also, glibc can probably be bumped by one minor version in the next release, which is going to switch to C++17. Then, potentially the same build cleanups can be done?
laanwj closed this
on May 4, 2020
MarcoFalke removed the label
Needs Guix build
on May 6, 2020
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me