[lttng-dev] two tracepoints header files of one provider
mathieu.desnoyers at efficios.com
Mon Oct 7 12:22:19 EDT 2019
----- On Oct 7, 2019, at 9:59 AM, Yonghong Yan yanyh15 at gmail.com wrote:
> For lttng-ust, can I put the tracepoint definition in two files, but they use
> the same provider.
Based on the terminology here: https://lttng.org/docs/v2.10/#doc-tracing-your-own-user-application
You need to have at most one instance of your tracepoint provider where
the header is included with TRACEPOINT_CREATE_PROBES, and exactly one
instance where TRACEPOINT_DEFINE is defined. (both can end up being within
the same object if you wish).
Then you can include your tracepoint provider header file at will across
other compile units in your program. Just make sure none of
TRACEPOINT_CREATE_PROBES nor TRACEPOINT_DEFINE are defined in those other
compile units. You can therefore call tracepoints from a given probe from
various compile units in your program.
Hoping this helps clarifying things,
> Thank you.
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
More information about the lttng-dev