[lttng-dev] linking of tracepoint probes

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue May 20 12:34:36 EDT 2014


On Tue, May 20, 2014 at 12:09 PM, Gerlando Falauto
<gerlando.falauto at keymile.com> wrote:
> Hi,
>
> I played a bit more and came to the following conclusion:
>
> - if I compile the application statically (so the tracepoint calls as well
> as their providers are linked with the main executable), tracepoints work
> but tracef() doesn't
>

You need to enable the DEBUG log level. See the USAGE WITH TRACEF
section of the lttng-ust man page.

Jérémie

> - if I compile and link the tracepoints, as well as the tracepoint calls,
> within a shared library, tracef() works but the tracepoint doesn't
>
> - if I change the above setting and recompile without cleaning first, I end
> up with the following message:
>
> LTTng-UST: Error (-17) while registering tracepoint probe. Duplicate
> registration of tracepoint probes having the same name is not allowed.
> Aborted
>
> So this means I'm doing something wrong with linking and/or libraries.
> As if I had the same symbol defined in two different places and one would
> win over the other according to how I'm compiling.
> Since I really have no clue how this whole machinery works, could someone
> please shed some light on this topic?
>
> Thank you!
> Gerlando
>
> On 05/16/2014 10:14 AM, Gerlando Falauto wrote:
>>
>> Hi,
>>
>> following up on my own mail:
>>
>> On 05/15/2014 07:39 PM, Gerlando Falauto wrote:
>> [...]
>>
>>> If I put an additional tracef() call exactly where my tracepoint is
>>> located, this gets traced without a problem. So the infrastructure
>>> should be all working in my opinion.
>>
>>
>> I repeated my test by compiling the same tracepoint provider directly on
>> the target, and linking it to a no-brainer main(), whose body simply
>> calls tracepoint() and tracef(). And I now get the opposite result!
>>
>> Now tracepoint() requests are perfectly recorded, whereas tracef() is
>> nowhere to be seen.
>>
>> Any hints?
>> Thank you!
>> Gerlando
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list