[cfe-dev] Xray with shared libraries?

Dean Michael Berris via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 27 16:14:08 PDT 2018


Hi Steve,

On Tue, 28 Aug 2018 at 8:00 am, Steve Lesser via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi all,
>
> I have been unsuccessfully trying to use Xray with shared libraries
> following the instructions on https://llvm.org/docs/XRay.html . 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
>
> I don't see any references to restrictions or special set up for shared
> libraries in the docs, but I see one mention in
> https://reviews.llvm.org/D38226 saying
>
> 'The XRay runtime currently doesn't support dynamic registration of
> instrumentation sleds in shared objects, which we'll start enabling in
> the future. That work has to happen in the back-end and in the runtime.'
>
> Does this mean Xray with shared libraries is unsupported at this time?
>

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.

Martin was looking at making that happen a while back, but we’ve gotten
sidetracked with other things in the meantime.

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.

Cheers

-- 
Dean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180828/57d9fb05/attachment.html>


More information about the cfe-dev mailing list