[llvm] 4f7298c - ManagedStatic: remove from PerfJITEventListener
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 10 02:29:32 PDT 2022
Author: Nicolai Hähnle
Date: 2022-07-10T10:32:40+02:00
New Revision: 4f7298cd79a8b0ffd57f8a2a77fe8456c190c8d5
URL: https://github.com/llvm/llvm-project/commit/4f7298cd79a8b0ffd57f8a2a77fe8456c190c8d5
DIFF: https://github.com/llvm/llvm-project/commit/4f7298cd79a8b0ffd57f8a2a77fe8456c190c8d5.diff
LOG: ManagedStatic: remove from PerfJITEventListener
This change originally landed as part of
e6f1f062457c928c18a88c612f39d9e168f65a85 (D129120), which caused a
Fuchsia buildbot regression in ExecutionEngine tests.
I am resubmitting the backed out parts in smaller pieces after a careful
review.
Added:
Modified:
llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
index 4a236e183c8b6..bb41bac325348 100644
--- a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
@@ -24,7 +24,6 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/Path.h"
@@ -488,15 +487,14 @@ void PerfJITEventListener::NotifyDebug(uint64_t CodeAddr,
}
}
-// There should be only a single event listener per process, otherwise perf gets
-// confused.
-llvm::ManagedStatic<PerfJITEventListener> PerfListener;
-
} // end anonymous namespace
namespace llvm {
JITEventListener *JITEventListener::createPerfJITEventListener() {
- return &*PerfListener;
+ // There should be only a single event listener per process, otherwise perf
+ // gets confused.
+ static PerfJITEventListener PerfListener;
+ return &PerfListener;
}
} // namespace llvm
More information about the llvm-commits
mailing list