[lttng-dev] tracing program flow

Alexandre Montplaisir alexandre.montplaisir at polymtl.ca
Sun May 6 12:19:34 EDT 2012

On 12-05-06 01:17 AM, Chuck Tuffli wrote:
> Hi -
> I'm investigating the feasibility of replacing some home grown tracing
> code with LTTng and am looking for advice from others who have used
> LTTng to trace program flow (i.e. trace function entry and exit
> points). One of the strengths of LTTng seems to be the ability to
> selectively enable tracepoints of interest (much more useful than our
> all-or-nothing tracing). To get this type of capability, would I need
> to implement an entry and exit tracepoint for each function or is
> there a better approach? Any other best practices people would be
> willing to share? TIA.


For now you'd have to create a custom probe for each function entry and

There's a feature on the wishlist to use GCC hooks to automatically
generate those probes [1]. The end result would be the same, but it
would be much less tedious to do the instrumentation part. A Clang
plugin was also mentioned previously [2], but I don't think anybody has
tried it yet.

[1] https://bugs.lttng.org/issues/39
[2] http://lists.lttng.org/pipermail/lttng-dev/2012-April/017787.html

Hope this helps,

Alexandre Montplaisir
École Polytechnique de Montréal

More information about the lttng-dev mailing list