Skip to content

Commit 4f7298c

Browse files
committed
ManagedStatic: remove from PerfJITEventListener
This change originally landed as part of e6f1f06 (D129120), which caused a Fuchsia buildbot regression in ExecutionEngine tests. I am resubmitting the backed out parts in smaller pieces after a careful review.
1 parent 60cbf3f commit 4f7298c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "llvm/Support/Debug.h"
2525
#include "llvm/Support/Errno.h"
2626
#include "llvm/Support/FileSystem.h"
27-
#include "llvm/Support/ManagedStatic.h"
2827
#include "llvm/Support/MemoryBuffer.h"
2928
#include "llvm/Support/Mutex.h"
3029
#include "llvm/Support/Path.h"
@@ -488,15 +487,14 @@ void PerfJITEventListener::NotifyDebug(uint64_t CodeAddr,
488487
}
489488
}
490489

491-
// There should be only a single event listener per process, otherwise perf gets
492-
// confused.
493-
llvm::ManagedStatic<PerfJITEventListener> PerfListener;
494-
495490
} // end anonymous namespace
496491

497492
namespace llvm {
498493
JITEventListener *JITEventListener::createPerfJITEventListener() {
499-
return &*PerfListener;
494+
// There should be only a single event listener per process, otherwise perf
495+
// gets confused.
496+
static PerfJITEventListener PerfListener;
497+
return &PerfListener;
500498
}
501499

502500
} // namespace llvm

0 commit comments

Comments
 (0)