[llvm-dev] ORC JIT Weekly #7 -- JITEventListener support and Swift Immediate Mode Migration
Lang Hames via llvm-dev
llvm-dev at lists.llvm.org
Sun Mar 15 22:59:48 PDT 2020
Does this also include support for PerfEventListener for profiling with
This patch just enables use of the JITEventListeners with
RTDyldObjectLinkingLayer. In theory it should bring
RTDyldObjectLinkingLayer users up to parity with MCJIT's support. (Note:
Windows and Linux still use RTDyldObjectLinkingLayer by default, MacOS uses
JITLink but can be manually switched back to RTDyldObjectLinkingLayer if
event listeners are needed).
So if PerfEventListener wasn't working for you before I wouldn't expect
this to fix the issue. On the other hand it makes sense to try it and file
a bug, since it *should* work.
What OS have you been seeing problems with?
I think, debugging and profiling support is very important for a JIT engine.
> I could never get it to work with older LLVM versions. Is there example
> code somewhere available?
Agreed -- We definitely want this. My plan at the moment is to make sure
the JITEventListener API is at parity with MCJIT to make it easy for
clients to transition. The long term plan is to re-implement debugging and
profiling support from the ground up via ObjectLinkingLayer::Plugins, which
are much more flexible than JITEventListeners.
I was hoping to land some example code today, but hit a bug with object
buffer ownership. I hope to sort this out and (re)commit the event listener
support and example code tomorrow.
On Mon, Mar 9, 2020 at 1:21 PM Frank Tetzel <s1445051 at mail.zih.tu-dresden.de>
> Hi Lang,
> > First: there is a preview patch up at https://reviews.llvm.org/D75838
> > to enable use of JITEventListeners in RTDyldObjectLinkingLayer. I've
> > only done very preliminary testing on it, but was able to debug
> > simple JIT'd programs on Linux using the GDB registration listener.
> > If you've been wanting to move to ORC but held up by lack of debugger
> > / profiler registration, chime in on the review -- I'd appreciate
> > feedback and help with testing. I will also post a bug tomorrow for
> > investigating similar (or hopefully better) debugger registration
> > functionality for JITLink.
> Does this also include support for PerfEventListener for profiling with
> I think, debugging and profiling support is very important for a JIT
> engine. I could never get it to work with older LLVM versions. Is there
> example code somewhere available?
> Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev