<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Frank,<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Does this also include support for PerfEventListener for profiling with perf?</blockquote></div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>What OS have you been seeing problems with?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I think, debugging and profiling support is very important for a <span>JIT </span>engine. I could never get it to work with older LLVM versions. Is there example code somewhere available?</blockquote><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Cheers,</div><div>Lang.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 9, 2020 at 1:21 PM Frank Tetzel <<a href="mailto:s1445051@mail.zih.tu-dresden.de" target="_blank">s1445051@mail.zih.tu-dresden.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Lang,<br>
<br>
> First: there is a preview patch up at <a href="https://reviews.llvm.org/D75838" rel="noreferrer" target="_blank">https://reviews.llvm.org/D75838</a><br>
> to enable use of JITEventListeners in RTDyldObjectLinkingLayer. I've<br>
> only done very preliminary testing on it, but was able to debug<br>
> simple JIT'd programs on Linux using the GDB registration listener.<br>
> If you've been wanting to move to ORC but held up by lack of debugger<br>
> / profiler registration, chime in on the review -- I'd appreciate<br>
> feedback and help with testing. I will also post a bug tomorrow for<br>
> investigating similar (or hopefully better) debugger registration<br>
> functionality for JITLink.<br>
<br>
Does this also include support for PerfEventListener for profiling with<br>
perf?<br>
<br>
I think, debugging and profiling support is very important for a JIT<br>
engine. I could never get it to work with older LLVM versions. Is there<br>
example code somewhere available?<br>
<br>
Best regards,<br>
Frank<br>
</blockquote></div>