[lttng-dev] Simple question about tracepoint defs

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Wed Jul 2 11:27:23 EDT 2014

Date: Wed, 2 Jul 2014 02:02:25 -0400
From: Sandeep K Chaudhary <babbusandy2006 at gmail.com>

> Is it not possible to have two or more trace-point definitions in the same header file?
> Reading from the manual[1] as
> "There can be an arbitrary number of tracepoint providers within an
> application, but they must each have their own provider name. Duplicate
> provider names are not allowed.",
>I get the idea that it is not possible since each tracepoint provider
>needs to have unique name, and therefore, should be in a different
>header file.
>Please confirm if this is the case.
> It would be much better for me if it is possible to have multiple
> trace-point definitions in the same header file.
> [1] https://lttng.org/files/doc/man-pages/man3/lttng-ust.3.html

   Each tracepoint provider can provide a number of tracepoints.  Ideally, each tracepoint header should cover a single tracepoint provider -otherwise you'd end up with two tracepoint providers in lockstep, which is much the same as regrouping their tracepoints under a single tracepoint provider, except with extra overhead.
   Think of the tracepoint provider as the shared object that implements its tracepoints.  It is a container for tracepoints, very much like a file system.  You can have two different tracepoints bearing the same name (identifier) as long as they are in different tracepoint providers, very much like you can have two different files with the same name as long as they are in different folders.
   I hope this clarifies things.

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
RDDC - Centre de recherches de Valcartier | DRDC - Valcartier Research Centre
2459 route de la Bravoure
Québec QC  G3J 1X5
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada

More information about the lttng-dev mailing list