<div dir="ltr">Sorry had a sending problem. <div><br></div><div>Here is the rest.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 24, 2016 at 12:35 PM, Jonathan Rajotte <span dir="ltr"><<a href="mailto:jonathan.r.julien@gmail.com" target="_blank">jonathan.r.julien@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p dir="ltr">Hi,</p><span class="">
<p dir="ltr">On Aug 24, 2016 12:18 PM, "Francis Deslauriers" <<a href="mailto:francis.deslauriers@mail.utoronto.ca" target="_blank">francis.deslauriers@mail.utor<wbr>onto.ca</a>> wrote:<br>
><br>
> Hi David, <br>
> If you specifically want to trace the scheduling of the threads of your app, you don't need custom tracepoints.<br>
> Enabling the sched_switch kernel event will give you both of cpu id and thread id. Look at the cpu_id and next_tid fields.<br>
><br>
> You can enable the sched_switch event using : lttng enable-event -k sched_switch</p>
</span><p dir="ltr">In TraceCompass you can inspect this data with the control flow view and the Ressource view under the Kernel analysis node under the trace node in the project explorer.</p>
<p dir="ltr">I'm not sure of the base requirement for those views you can use the safe enable-event:</p></div></blockquote><div><br></div><div>replace "safe" by "easiest".</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p dir="ltr">lttng enable-event -k 'sched*'</p><p dir="ltr"><br></p><p>You can also use "lttng track" to limi the gathering of event to a certain pid.</p><p><br></p><p>Another way to reduce the scope would be to filter per procname:</p><p><br></p><p>lttng create<br>lttng add-context -k -t procname<br>lttng enable-event 'sched*' --filter '$ctx.procname == "PROCNAMEHERE"'</p></div></blockquote><div>lttng start</div><div><br></div><div><br></div><div>PROCNAMEHERE can contain '*' wildcard. See the man page for more information.</div><div><br></div><div>Cheers</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><p dir="ltr">
><br>
> Cheers,<br>
> Francis<br>
><br>
><br>
> 2016-08-24 3:17 GMT-04:00 David Aldrich <<a href="mailto:David.Aldrich@emea.nec.com" target="_blank">David.Aldrich@emea.nec.com</a>>:<br>
>><br>
>> Hi<br>
>><br>
>>  <br>
>><br>
>> I am new to tracing in Linux and to lttng. I have a multi-threaded user application and I want to see:<br>
>><br>
>>  <br>
>><br>
>> 1)      When the threads are scheduled to run<br>
>><br>
>> 2)      Which cores the threads are running on.<br>
>><br>
>>  <br>
>><br>
>> I have installed lttng on Ubuntu 14.04 LTS.  I am expecting to visualise the trace using TraceCompass.<br>
>><br>
>>  <br>
>><br>
>> I have read the following doc section:<br>
>><br>
>>  <br>
>><br>
>> <a href="http://lttng.org/docs/#doc-tracing-your-own-user-application" target="_blank">http://lttng.org/docs/#doc-tra<wbr>cing-your-own-user-application</a><br>
>><br>
>>  <br>
>><br>
>> In order to collect my trace, must I define custom tracepoint definitions ( in a tracepoint provider header file ), and insert tracepoints into my user application, or is there a simpler way of achieving my goal?<br>
>><br>
>>  <br>
>><br>
>> Best regards<br>
>><br>
>>  <br>
>><br>
>> David<br>
>><br>
>>  <br>
>><br>
>><br>
>> ______________________________<wbr>_________________<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-bi<wbr>n/mailman/listinfo/lttng-dev</a><br>
>><br>
><br>
><br>
> ______________________________<wbr>_________________<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-bi<wbr>n/mailman/listinfo/lttng-dev</a><br>
></p>
</span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Jonathan Rajotte Julien<div><br></div></div></div></div></div>
</div></div>