----- On Nov 30, 2018, at 11:09 AM, John OSullivan <john.osulli...@blackbox.com> wrote:
> 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? I am a bit confused by your use of the word "members" here. A tracepoint class has a provider name, a class name, input argument, and output fields. The event instance refers to the class by provider and class name, defines its own name, and needs to have a compatible input argument prototype (same number of arguments, same types). It will serialize the output fields in the exact layout described by the event class. I know it does not directly answer your question, but I'm really unsure about what you mean by "members". Thanks, Mathieu > 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. > _______________________________________________ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
_______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev