[lttng-dev] Correct way to use the tpl file
John O'Sullivan
John.OSullivan at BlackBox.com
Fri Nov 30 11:09:00 EST 2018
Hi,
I am looking for some advice on the best way to manage the tracing of some user space events.
I have a series of events that are fed to queues, they look something like the following sample
EventEnd* event_end_new()
{
EventEnd* event_end = bb_xnew(EventEnd,__func__);
if (event_end != NULL)
{
event_end->type = EQ_EVENT_END;
. .. other event specific fields here
..
}
#ifdef LTTNG_TRACE
tracepoint(core_event_trace, end_event_tracepoint, EQ_EVENT_END);
#endif
return event_end;
}
I want to try and trace these so created the following template shown below. My question is, does the class have to have all of the possible members that the different instances will have, as each unique event is likely to have different members will the class have to have all of these members defines, and if this is the case is it okay for an instance to just implement a subset of the members the class defines?
TRACEPOINT_EVENT_CLASS(
/* Tracepoint provider name */
core_event_trace,
/* Tracepoint class name */
core_event_tracepoint_class,
/* Input arguments */
TP_ARGS(
int, event_type
),
/* Output event fields */
TP_FIELDS(
ctf_integer(int, event_type, event_type)
)
)
TRACEPOINT_EVENT_INSTANCE(
core_event_trace,
core_event_tracepoint_class,
end_event_tracepoint,
TP_ARGS(
int, event_type
)
)
TRACEPOINT_EVENT_INSTANCE(
core_event_trace,
core_event_tracepoint_class,
start_event_tracepoint,
TP_ARGS(
int, event_type
)
)
TRACEPOINT_EVENT_INSTANCE(
core_event_trace,
core_event_tracepoint_class,
foo_event_tracepoint,
TP_ARGS(
int, event_type
)
)
________________________________
This email and any files transmitted with it are confidential and are intended for the sole use of the individual to whom they are addressed. Black Box Corporation reserves the right to scan all e-mail traffic for restricted content and to monitor all e-mail in general. If you are not the intended recipient or you have received this email in error, any use, dissemination or forwarding of this email is strictly prohibited. If you have received this email in error, please notify the sender by replying to this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20181130/c9d96d46/attachment-0001.html>
More information about the lttng-dev
mailing list