forked from OSchip/llvm-project
f5aaa999b9
Summary: This fixes two threading issues in the logging code. The access to the mask and options flags had data races when we were trying to enable/disable logging while another thread was writing to the log. Since we can log from almost any context, and we want it to be fast, so I avoided locking primitives and used atomic variables instead. I have also removed the (unused) setters for the mask and flags to make sure that the only way to set them is through the enable/disable channel functions. I also add tests, which when run under tsan, verify that the use cases like "doing an LLDB_LOGV while another thread disables logging" are data-race-free. Reviewers: zturner, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30702 llvm-svn: 297368 |
||
---|---|---|
.. | ||
Breakpoint | ||
Core | ||
Editline | ||
Expression | ||
Host | ||
Interpreter | ||
Language | ||
ObjectFile | ||
Platform | ||
Process | ||
ScriptInterpreter | ||
Signals | ||
Symbol | ||
SymbolFile | ||
Target | ||
UnwindAssembly | ||
Utility | ||
CMakeLists.txt | ||
gtest_common.h |