<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<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>
<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 face="Arial" color="Gray" size="1"><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>
</body>
</html>