Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Automatic instrumentation using a clang plugin
@ 2012-04-12  9:10 Stefan Hajnoczi
  0 siblings, 0 replies; only message in thread
From: Stefan Hajnoczi @ 2012-04-12  9:10 UTC (permalink / raw)


You may have already seen this, it's a userspace C/C++ tracing tool
that uses a clang plugin to instrument all functions in the source
code including arguments and type information.  This allows it to
easily trace everything that happens inside an app.

The actual tracer is probably along the lines of LTTng UST, I haven't
checked.  Here's the link to the clang plugin which I think is the
interesting part:

https://github.com/yotamr/traces/tree/master/trace_instrumentor

and the wrapper script to use in place of gcc/g++:

https://github.com/yotamr/traces/blob/master/ccwrap.py

Hope this is not too spammy for the list, just wanted to share because
the clang plugin is an interesting approach.  The advantage is that
you don't need to hope your trace points provide the right information
- you can trace any function.  Another approach to achieving similar
ease-of-use would be a dynamic userspace probing mechanism that uses
DWARF info but I'm not sure if the right information is available in
the DWARF info or how hard dynamic probing is in practice.

Stefan



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-12  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12  9:10 [lttng-dev] Automatic instrumentation using a clang plugin Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox