<div dir="ltr"><p dir="ltr">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.</p>
<p dir="ltr">You can enable the sched_switch event using : lttng enable-event -k sched_switch</p>
<p dir="ltr">Cheers,<br>
Francis</p>
<div class="gmail_extra"><br><div class="gmail_quote">2016-08-24 3:17 GMT-04:00 David Aldrich <span dir="ltr"><<a href="mailto:David.Aldrich@emea.nec.com" target="_blank">David.Aldrich@emea.nec.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-GB" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am new to tracing in Linux and to lttng. I have a multi-threaded user application and I want to see:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p><u></u><span>1)<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>When the threads are scheduled to run<u></u><u></u></p>
<p><u></u><span>2)<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Which cores the threads are running on.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have installed lttng on Ubuntu 14.04 LTS. I am expecting to visualise the trace using TraceCompass.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have read the following doc section:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><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><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In order to collect my trace, must I define custom tracepoint definitions (<span><span style="color:#1a1a1a;background:#fdfdfd"> in a
</span></span><span style="color:#1a1a1a;background:#fdfdfd">tracepoint provider<span> header file ), and insert tracepoints into my user application, or is there a simpler way of achieving my goal?</span></span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span>Best regards<span><font color="#888888"><u></u><u></u></font></span></span></p><span><font color="#888888">
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>David<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></div>
</div>
<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" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-bi<wbr>n/mailman/listinfo/lttng-dev</a><br>
<br></blockquote></div><br></div>
</div>