<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span id="zwchr" data-marker="__DIVIDER__">----- On Oct 24, 2018, at 11:05 PM, Alok Priyadarshi <alokpr@gmail.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><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">I am trying to add a thread timestamp to trace events. By thread timestamp I mean the value returned by clock_gettime(CLOCK_THREAD_CPUTIME_ID):<div><a href="https://linux.die.net/man/3/clock_gettime" target="_blank">https://linux.die.net/man/3/clock_gettime</a><br></div><br><div>I could do this by creating custom events, but I am wondering if there is already a way to add this information to event context. I have tried using the following arguments to lttng-add-context, but none of them add any additional information:</div><div><div>perf:cpu:cpu-cycles</div><div>perf:cpu:cycles</div></div><div><div>perf:thread:cpu-cycles</div><div>perf:thread:cycles</div></div><br><div>Note that I have only enabled userspace events. I use the following sequence of commands to capture trace:</div><div><div>lttng create</div><div>lttng enable-event --userspace --all</div><div>lttng add-context --userspace -t vpid -t vtid -t perf:thread:cycles</div><div>lttng start</div><div>lttng stop</div></div></div></blockquote><div>We would need to extend lttng-ust implementation and lttng-tools to add those<br></div><div>additional contexts. It would make sense to add these.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></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"><br></div>
<br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>