<font size=2 face="sans-serif">+1 on that.</font>
<br>
<br><font size=2 face="sans-serif">I think we should have a way for UST
to store the function names in the metadata, so the trace remains valid
for any viewer that correctly supports CTF.</font>
<br>
<br><font size=2 face="sans-serif">I think Mathieu Desnoyers said once
that this requires a modification to the CTF spec, so let's start raising
out voice for this...</font>
<br>
<br><font size=2 face="sans-serif">As Paul mentioned, he has a solution,
and I have a somewhat different solution (which I will share sometime in
the near future), but I still think that having the function names in the
metadata is better.</font>
<br>
<br><font size=2 color=#000080 face="sans-serif">Amit Margalit</font>
<br><font size=2 color=#808000 face="sans-serif">IBM XIV </font><font size=2 face="sans-serif">-
<i>Storage Reinvented</i></font>
<br><font size=2 face="sans-serif">XIV-NAS Development Team</font>
<br><font size=2 face="sans-serif">Tel. 03</font><font size=2 face="Arial">-689-7774</font>
<br><font size=2 face="Arial">Fax. 03-689-7230</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">"Woegerer, Paul"
<Paul_Woegerer@mentor.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif"><alexmonthy@voxpopuli.im>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">lttng-dev <lttng-dev@lists.lttng.org></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">09/10/2013 10:01 AM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [lttng-dev]
Getting function names with lttng-ust-cyg-profile.so</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi Alexandre,<br>
<br>
For trivial examples you can go with 'nm -CS' (or the like), but when<br>
you start to use liblttng-ust-cyg-profile.so in combination with shared<br>
objects you will need to record base address information as well (to<br>
allow you map a virtual memory address at a given point in time to<br>
offset and path of a shared object (or executable)).<br>
<br>
That is one of the reasons why I have submitted:<br>
</font></tt><a href="http://lists.lttng.org/pipermail/lttng-dev/2013-August/021264.html"><tt><font size=2>http://lists.lttng.org/pipermail/lttng-dev/2013-August/021264.html</font></tt></a><tt><font size=2><br>
<br>
Thanks,<br>
Paul<br>
<br>
On 09/10/2013 01:44 AM, Mathieu Desnoyers wrote:<br>
> We might want to investigate doing a side-program that gathers the<br>
> executables on the system, and lookup the symbols from the ELF. We
could<br>
> save those in a bin/ subdirectory of a CTF trace. All we need is<br>
> instrumentation of the dynamic linker, and to know the executable
names<br>
> associated with PIDs. There is a UST feature request for dynamic linker<br>
> instrumentation.<br>
><br>
> Thanks,<br>
><br>
> Mathieu<br>
><br>
> * Alexandre Montplaisir (alexmonthy@voxpopuli.im) wrote:<br>
>> Hi all,<br>
>><br>
>> I've recently started playing with liblttng-ust-cyg-profile.so
(aka,<br>
>> getting UST events from -finstrument-functions), and I have to
say it's<br>
>> pretty nifty! I haven't done any benchmarks, but it's certainly
faster<br>
>> than the typical printf() that people use with it...<br>
>><br>
>> However, in the resulting trace, one only gets the addresses of
the<br>
>> functions. I understand how it's relatively "easy" for
the seasoned user<br>
>> to use nm or addr2line to get the actual function names, but would
it<br>
>> possible - and how hard would it be - to have this information
(function<br>
>> names) directly in the trace?<br>
>><br>
>><br>
>> I'm trying to leverage this feature in Eclipse TMF to display
a call<br>
>> stack for such UST traces. And to be honest, displaying a call
stack<br>
>> with only the function addresses is completely useless, we need
the<br>
>> function names.<br>
>><br>
>> We could have the user import a text file (which he can generate
with<br>
>> "nm appname > file.txt" for example). But then he
needs the original<br>
>> binary, which he might not have. And that binary needs to be compiled<br>
>> with debugging symbols. If the function name information was already
in<br>
>> the trace, it would make the user experience much better, and
our job<br>
>> much easier! ;)<br>
>><br>
>><br>
>> Thoughts?<br>
>><br>
>> Thanks,<br>
>> Alex<br>
>><br>
>> _______________________________________________<br>
>> lttng-dev mailing list<br>
>> lttng-dev@lists.lttng.org<br>
>> </font></tt><a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev"><tt><font size=2>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</font></tt></a><tt><font size=2><br>
<br>
<br>
-- <br>
Paul Woegerer, SW Development Engineer<br>
Sourcery Analyzer <</font></tt><a href=http://go.mentor.com/sourceryanalyzer><tt><font size=2>http://go.mentor.com/sourceryanalyzer</font></tt></a><tt><font size=2>><br>
Mentor Graphics, Embedded Software Division<br>
<br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
lttng-dev@lists.lttng.org<br>
</font></tt><a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev"><tt><font size=2>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</font></tt></a><tt><font size=2><br>
<br>
</font></tt>
<br>