[PATCH] D129089: [BOLT] Fix concurrent hash table modification in the instrumentation runtime
Vladislav Khmelevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 04:29:51 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbd301a418bf2: [BOLT] Fix concurrent hash table modification in the instrumentation runtime (authored by michoecho, committed by yota9).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129089/new/
https://reviews.llvm.org/D129089
Files:
bolt/runtime/instr.cpp
Index: bolt/runtime/instr.cpp
===================================================================
--- bolt/runtime/instr.cpp
+++ bolt/runtime/instr.cpp
@@ -289,6 +289,7 @@
/// Traverses all elements in the table
template <typename... Args>
void forEachElement(void (*Callback)(MapEntry &, Args...), Args... args) {
+ Lock L(M);
if (!TableRoot)
return;
return forEachElement(Callback, InitialSize, TableRoot, args...);
@@ -378,7 +379,6 @@
template <typename T, uint32_t X, uint32_t Y>
void SimpleHashTable<T, X, Y>::resetCounters() {
- Lock L(M);
forEachElement(resetIndCallCounter);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129089.442862.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220707/fb8c3530/attachment.bin>
More information about the llvm-commits
mailing list