[PATCH] D126214: Register profiling support for OrcJit in lli
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 17:03:17 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb6ae90b86c42: [lli] Register profiling support for ORC in lli (authored by tetzank, committed by lhames).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126214/new/
https://reviews.llvm.org/D126214
Files:
llvm/tools/lli/lli.cpp
Index: llvm/tools/lli/lli.cpp
===================================================================
--- llvm/tools/lli/lli.cpp
+++ llvm/tools/lli/lli.cpp
@@ -946,9 +946,22 @@
auto J = ExitOnErr(Builder.create());
auto *ObjLayer = &J->getObjLinkingLayer();
- if (auto *RTDyldObjLayer = dyn_cast<orc::RTDyldObjectLinkingLayer>(ObjLayer))
+ if (auto *RTDyldObjLayer = dyn_cast<orc::RTDyldObjectLinkingLayer>(ObjLayer)) {
RTDyldObjLayer->registerJITEventListener(
*JITEventListener::createGDBRegistrationListener());
+#if LLVM_USE_OPROFILE
+ RTDyldObjLayer->registerJITEventListener(
+ *JITEventListener::createOProfileJITEventListener());
+#endif
+#if LLVM_USE_INTEL_JITEVENTS
+ RTDyldObjLayer->registerJITEventListener(
+ *JITEventListener::createIntelJITEventListener());
+#endif
+#if LLVM_USE_PERF
+ RTDyldObjLayer->registerJITEventListener(
+ *JITEventListener::createPerfJITEventListener());
+#endif
+ }
if (PerModuleLazy)
J->setPartitionFunction(orc::CompileOnDemandLayer::compileWholeModule);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126214.505329.patch
Type: text/x-patch
Size: 1060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230315/e95e0e46/attachment.bin>
More information about the llvm-commits
mailing list