From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefanha@gmail.com (Stefan Hajnoczi) Date: Thu, 12 Apr 2012 10:10:22 +0100 Subject: [lttng-dev] Automatic instrumentation using a clang plugin Message-ID: 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