[llvm] Fix tsan race in PerfJITEventListener.cpp (PR #106800)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 14:25:30 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff d66765ddf1ae9e16676a49cebd966258f8b5c6e0 4904b7396988bd7fd9319e26eaa5cdfa7ce98f60 --extensions cpp -- llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
index b7b07cc411..cf9ed7dbff 100644
--- a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
@@ -63,7 +63,7 @@ public:
// Lock a mutex to correctly synchronize with prior calls to
// `notifyObjectLoaded` and `notifyFreeingObject` that happened on other
// threads to prevent tsan from complaining.
- std::lock_guard<sys::Mutex> Guard(Mutex);
+ std::lock_guard<sys::Mutex> Guard(Mutex);
if (MarkerAddr)
CloseMarker();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/106800
More information about the llvm-commits
mailing list