<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">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="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Dean</div></div></div>