<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Amit and Michel, I appreciate your replies.</div><div class="gmail_quote">Please see my comments below.</div><div class="gmail_quote"><br></div><div class="gmail_quote">
On Wed, Mar 19, 2014 at 5:09 PM, Michel Dagenais <span dir="ltr"><<a href="mailto:michel.dagenais@polymtl.ca" target="_blank">michel.dagenais@polymtl.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div class=""><blockquote style="padding-left:5px;font-size:12pt;font-style:normal;margin-left:5px;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal;border-left:2px solid #1010ff">
<font face="sans-serif">If I understand correctly, filtering is
done at the client application side.</font>
<br></blockquote></div>With UST yes.<div class=""><br><blockquote style="padding-left:5px;font-size:12pt;font-style:normal;margin-left:5px;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal;border-left:2px solid #1010ff">
<font face="sans-serif">This means that filtering could theoretically
lower the performance of the running application which has to check, for
each event, whether it should be sent to the daemon or not.</font>
<br></blockquote></div>Each event is checked against the filter and then written to the buffer or not. With a simple filter and most events filtered out, checking the filter is faster than writing to the buffer (with atomic operations to increment the buffer counters) and you definitely save (at each tracepoint and in the daemon with trace buffers filling more slowly). If the filter is complicated and most often keeps the event, then you certainly loose.<br>
</div></div></blockquote><div><br></div><div>That's what I thought, but benchmarking showed that there's practically no difference.</div><div>The filter is a simple ID comparison of the form 'id % 1,000 == 0', so 999 out of 1K tracepoints are filtered out.</div>
<div>Could you please point me to some references on this topic?</div><div><br></div><div>Thanks,</div><div>Ilya</div><div> </div></div><br></div></div>