[lttng-dev] linking of tracepoint probes
Gerlando Falauto
gerlando.falauto at keymile.com
Tue May 20 12:09:00 EDT 2014
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
- 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
More information about the lttng-dev
mailing list