<div dir="ltr">Hi Daniel,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 8:36 PM, Thibault, Daniel <span dir="ltr"><<a href="mailto:Daniel.Thibault@drdc-rddc.gc.ca" target="_blank">Daniel.Thibault@drdc-rddc.gc.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
   I do believe that the filter drops the event before it starts resolving its arguments, so filtering should be enough.  Someone more familiar with the internals of LTTng should set us straight either way.<br></blockquote>

<div><br></div><div><br></div><div>Simple demonstration using tracef():</div><div><br></div><div><div>$ cat a.c </div><div>#include <stdlib.h></div><div>#include <unistd.h></div><div>#include <lttng/tracef.h></div>

<div><br></div><div>int main()</div><div>{</div><div>    for (;;) {</div><div>        tracef("hello", (abort(), 1));</div><div>        sleep(1);</div><div>    }</div><div><br></div><div>    return 0;</div><div>
}</div>
</div><div>$ gcc a.c -llttng-ust<br></div><div><div>$ ./a.out &</div><div>[1] 12820</div><div>$ ./a.out &<br></div><div>[2] 12823</div></div><div><div>$ lttng create</div><div>Session auto-20140731-205604 created.</div>

<div>Traces will be written in /home/sbn/lttng-traces/auto-20140731-205604</div><div>$ lttng add-context -u -t vpid<br></div><div>UST context vpid added to all channels</div><div>$ lttng enable-event -u lttng_ust_tracef:event -f '$ctx.vpid==12820'<br>

</div><div>Event lttng_ust_tracef:event: Filter '$ctx.vpid==12820' successfully set</div><div>$ lttng start<br></div><div>Tracing started for session auto-20140731-205604</div><div>$ <br></div><div>[1]-  Aborted                 (core dumped) ./a.out</div>

<div>[2]+  Aborted                 (core dumped) ./a.out</div></div><div><br></div><div>So I specify filter on PID, but probe fired in both processes.</div><div>That's not what I want.</div><div><br></div><div>Regards!</div>
</div></div></div>