[lttng-dev] Getting function names with lttng-ust-cyg-profile.so

Alexandre Montplaisir alexmonthy at voxpopuli.im
Mon Sep 9 18:46:38 EDT 2013

Hi all,

I've recently started playing with liblttng-ust-cyg-profile.so (aka,
getting UST events from -finstrument-functions), and I have to say it's
pretty nifty! I haven't done any benchmarks, but it's certainly faster
than the typical printf() that people use with it...

However, in the resulting trace, one only gets the addresses of the
functions. I understand how it's relatively "easy" for the seasoned user
to use nm or addr2line to get the actual function names, but would it
possible - and how hard would it be - to have this information (function
names) directly in the trace?

I'm trying to leverage this feature in Eclipse TMF to display a call
stack for such UST traces. And to be honest, displaying a call stack
with only the function addresses is completely useless, we need the
function names.

We could have the user import a text file (which he can generate with
"nm appname > file.txt" for example). But then he needs the original
binary, which he might not have. And that binary needs to be compiled
with debugging symbols. If the function name information was already in
the trace, it would make the user experience much better, and our job
much easier! ;)



More information about the lttng-dev mailing list