<div dir="ltr">Jonathan: The system is x86_64, 16 cores, no cpu affinity set. Not too sure about load yet.<div><br><div>Mathieu: The explanation makes sense. Running babeltrace with --stream-intersection flag did filter out a lot of events. However it is hard to verify the filtered result because we do not yet know how to read the text format. Does the babeltrace python API support stream intersection by any chance?<br><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 8, 2018 at 9:52 AM Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div>Hi Alok,</div><div><br></div><div>With a snapshot trace, you can end up with some per-cpu buffers that contain information<br></div><div>going further back in time compared to other per-cpu buffers. This depends on the level of<br></div><div>system activity and tracing throughput for each CPU.<br></div><div><br></div><div>The situation you experience can very well be triggered by having the begin event on one CPU,</div><div>being migrated to another CPU, and having the end event on another CPU. If either the<br></div><div>source or destination CPU has been more active than the other, you may find that you<br></div><div>have only the begin or the end event in your trace.<br></div><div><br></div><div>This is why we implemented the "stream intersection" mode in babeltrace. It ensures that<br></div><div>babeltrace cuts away trace data belonging to time spans that only appear in some of<br></div><div>the streams. It is not however activated by default.</div><div><br></div><div>To try it out, you can do this:<br></div><div><br></div><div>babeltrace --stream-intersection path/to/trace<br></div><div><br></div><div>Does it help ?<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Mathieu<br></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div><br></div><div><span id="m_-9171930826021529964zwchr">----- On Nov 7, 2018, at 7:12 PM, Alok Priyadarshi <<a href="mailto:alokpr@gmail.com" target="_blank">alokpr@gmail.com</a>> wrote:<br></span></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><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"><div dir="ltr"><div>A custom trace event class emits "begin" and "end" events in its constructor and destructor respectively. So I do not think this is due to conditional path.</div><br>Sequence of commands to capture a snapshot are:<div><div>lttng create --snapshot</div><div>lttng enable-event --userspace --all</div><div>lttng add-context --userspace -t vpid -t vtid</div><div>lttng start<br></div><div>lttng stop</div><div>lttng snapshot record</div></div><div dir="ltr"><div dir="ltr"><br><div>We create a new session for each snapshot to make sure that the buffer does not have any left-over events from the previous session. But I am curious if lttng shares buffers between sessions or re-uses buffers from an old session without flushing?</div><br><div>Note that I am using the defaultĀ LTTNG_BUFFER_PER_UID mode. All processes for our application run under one UID, and only one tracing session is active at a time.</div><br><div><div class="gmail_quote"><div dir="ltr">On Wed, Nov 7, 2018 at 12:09 PM Jonathan Rajotte-Julien <<a href="mailto:jonathan.rajotte-julien@efficios.com" target="_blank">jonathan.rajotte-julien@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alok,<br>
<br>
On Wed, Nov 07, 2018 at 11:53:25AM -0800, Alok Priyadarshi wrote:<br>
> Hi Jonathan,<br>
> <br>
> Thanks for your response.<br>
> <br>
> We are tracing function scopes. Each scope emits two events - begin and<br>
> end. We noticed that some begin events did not have corresponding end<br>
> events in the trace.<br>
<br>
Seems like a solid ground as long as the corresponding ending event is not<br>
inside any conditional paths. I'm sure you already validated that but we never<br>
know.<br>
<br>
> <br>
> I have the trace with this problem available. Would that provide any clue?<br>
<br>
It could help but I presume it might contains confidential or sensible<br>
information. Let's define the scenario first and we will go back to actual<br>
trace data if needed.<br>
<br>
> If not, I will try to extract a small reproducer.<br>
<br>
That would be best. In the meantime, could you provide the exact lttng commands<br>
used to setup everything and describe subsequent lttng commands used for<br>
snapshot etc.<br>
<br>
You can omit event name or replace them with dummy name if necessary.<br>
<br>
Cheers<br>
<br>
-- <br>
Jonathan Rajotte-Julien<br>
EfficiOS<br>
</blockquote></div></div></div></div></div>
<br></blockquote></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><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">_______________________________________________<br>lttng-dev mailing list<br><a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br><a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br></blockquote></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div><br></div><div>-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a></div></div></div></blockquote></div>