[llvm-dev] RFC: Comprehensive Static Instrumentation
TB Schardl via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 23 19:31:19 PDT 2016
Hey Dean and Matthias,
Thanks for pointing out XRay to us.
Implementing XRay on top of CSI is an interesting question. Like XRay, CSI
can insert instrumentation at function entry and exit points (as well as at
many other points in the IR). CSI and XRay effectively instrument programs
in different ways, however. Using CSI, the IR of a CSI tool is integrated
with the IR of the program-under-test such that the code of the tool is
always executed when the instrumented program is run. (The tool-writer
might implement their tool to execute instrumentation code conditionally
based on a flag that is toggled during program execution, but implementing
such functionality is up to the tool-writer.) XRay sleds, however, are
regions of assembly added to the program-under-test that can be overwritten
at runtime into calls to an XRay tool. It would be interesting to explore
down the road what the tradeoffs are of these different approaches, as well
as how these strategies might be unified into the same framework.
Regarding runtime components in CSI-tools: I don't think there should be
any issue with a CSI tool using a runtime component. In fact, if you have
an example XRay tool available, we'd be interested in trying to port it to
CSI. I think the CSI port should be able to replicate the functionality of
the tool, though I don't know how its performance will compare to the XRay
approach. Is there some place where we can grab an XRay tool to try out?
On Fri, Jun 17, 2016 at 1:36 AM, Dean Michael Berris via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On Fri, Jun 17, 2016 at 5:42 AM Matthias Braun via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>> Some of this overlaps with the features in XRay (
> Matthias beat me to it!
> From reading the RFC, it seems that some of what XRay is doing on the
> instrumentation side is very similar to what CSI enables. The current
> implementation I'm working with (in http://reviews.llvm.org/D19904)
> requires some very deep integration with the LLVM compiler infrastructure
> (essentially a machine function pass, and instruction lowering on a
> per-platform basis).
> The development of XRay has a few trade-offs for code-size effect and
> runtime overhead, which I suspect are unique to XRay's target use-case
> which is for efficient function call accounting/tracing.
> So I have two high-level questions:
> - Will something like XRay be implementable on-top of CSI?
> - How will the runtime components cooperate or be handled by tools built
> on top of CSI?
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev