<div dir="ltr">Hi Dean,<br><br>Thank you for the explanation.<br><br>I'm happy to get involved getting runtime patching of shared libraries into XRay. I'm new to clang / llvm contribution so I'm sure there will be some ramp up- it will be very helpful to collaborate to ease in. Please let me know what is the best way of catching up on the latest explorations / investigation of XRay with shared libraries.<br><br>Cheers,<br>Steve</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 11:14 AM Dean Michael Berris <<a href="mailto:dean.berris@gmail.com">dean.berris@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Hi Steve,</div></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, 28 Aug 2018 at 8:00 am, Steve Lesser via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<br><br>I have been unsuccessfully trying to use Xray with shared libraries following the instructions on <a href="https://llvm.org/docs/XRay.html" target="_blank">https://llvm.org/docs/XRay.html</a> . When compiling and linking binaries such as a google test runner with '-fxray-instrument' I get results from any code built from the executable itself, but code from shared libraries also built with '-fxray-instrument' never appear in the results. This is all in C++, linux, x86_64<br><br>I don't see any references to restrictions or special set up for shared libraries in the docs, but I see one mention in <a href="https://reviews.llvm.org/D38226" target="_blank">https://reviews.llvm.org/D38226</a> saying <br><br>'<span style="color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">The XRay runtime currently doesn't support dynamic registration of</span><br style="margin-top:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">instrumentation sleds in shared objects, which we'll start enabling in</span><br style="color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">the future. That work has to happen in the back-end and in the runtime.'</span><br><br>Does this mean Xray with shared libraries is unsupported at this time?</div></blockquote><div dir="auto"><br></div><div dir="auto">Yes, unfortunately we don’t support runtime patching of shared libraries yet. There were some explorations early on with how to get that working and integrated in the runtime, but that work has stalled.</div><div dir="auto"><br></div><div dir="auto">Martin was looking at making that happen a while back, but we’ve gotten sidetracked with other things in the meantime.</div><div dir="auto"><br></div><div dir="auto">I’d be happy to review proposals and patches, and we have some ideas to what might work here. If you’re interested in exploring the options and/or making contributions to get that working, I’d be happy to collaborate.</div><div dir="auto"><br></div><div dir="auto">Cheers</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>-- <br><div dir="ltr" class="m_4200595505417659628gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Dean</div></div></div>
</blockquote></div>