forked from OSchip/llvm-project
ManagedStatic: remove from PerfJITEventListener
This change originally landed as part of
e6f1f06245
(D129120), which caused a
Fuchsia buildbot regression in ExecutionEngine tests.
I am resubmitting the backed out parts in smaller pieces after a careful
review.
This commit is contained in:
parent
60cbf3fade
commit
4f7298cd79
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue