<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><style style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style></div><div><br></div><div><br></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Nov 30, 2018, at 11:09 AM, John OSullivan <John.OSullivan@BlackBox.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<p>Hi,</p>
<p>I am looking for some advice on the best way to manage the tracing of some user space events.</p>
<p><br>
</p>
<p>I have a series of events that are fed to queues, they look something like the following sample<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>EventEnd* event_end_new()<br>
{<br>
EventEnd* event_end = bb_xnew(EventEnd,__func__);<br>
<br>
if (event_end != NULL)<br>
{<br>
event_end->type = EQ_EVENT_END;<br>
. .. other event specific fields here</p>
<p> ..<br>
}<br>
#ifdef LTTNG_TRACE<br>
tracepoint(core_event_trace, end_event_tracepoint, EQ_EVENT_END);<br>
#endif<br>
return event_end;<br>
}<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>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?</p></blockquote><div><br></div><div>I am a bit confused by your use of the word "members" here. A tracepoint class has a provider name,<br data-mce-bogus="1"></div><div>a class name, input argument, and output fields.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>The event instance refers to the class by provider and class name, defines its own name, and needs to</div><div>have a compatible input argument prototype (same number of arguments, same types). It will serialize</div><div>the output fields in the exact layout described by the event class.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I know it does not directly answer your question, but I'm really unsure about what you mean<br data-mce-bogus="1"></div><div>by "members".<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>TRACEPOINT_EVENT_CLASS(<br>
/* Tracepoint provider name */<br>
core_event_trace,<br>
<br>
/* Tracepoint class name */<br>
core_event_tracepoint_class,<br>
<br>
/* Input arguments */<br>
TP_ARGS(<br>
int, event_type<br>
<br>
),<br>
<br>
/* Output event fields */<br>
TP_FIELDS(<br>
ctf_integer(int, event_type, event_type)<br>
<br>
)<br>
)<br>
<br>
<br>
<br>
<br>
<br>
TRACEPOINT_EVENT_INSTANCE(<br>
core_event_trace,<br>
core_event_tracepoint_class,<br>
end_event_tracepoint,<br>
TP_ARGS(<br>
int, event_type<br>
<br>
)<br>
)<br>
<br>
TRACEPOINT_EVENT_INSTANCE(<br>
core_event_trace,<br>
core_event_tracepoint_class,<br>
start_event_tracepoint,<br>
TP_ARGS(<br>
int, event_type<br>
)<br>
)<br>
<br>
<br>
<br>
TRACEPOINT_EVENT_INSTANCE(<br>
core_event_trace,<br>
core_event_tracepoint_class,<br>
foo_event_tracepoint,<br>
TP_ARGS(<br>
int, event_type<br>
)<br>
)<br>
</p>
<br>
<hr>
<font size="1" face="Arial" color="Gray"><br>
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.<br></font>
<br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>