[lttng-dev] Adding thread timestamp to event context

Alok Priyadarshi alokpr at gmail.com
Wed Oct 24 18:05:08 EDT 2018


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):
https://linux.die.net/man/3/clock_gettime

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:
perf:cpu:cpu-cycles
perf:cpu:cycles
perf:thread:cpu-cycles
perf:thread:cycles

Note that I have only enabled userspace events. I use the following
sequence of commands to capture trace:
lttng create
lttng enable-event --userspace --all
lttng add-context --userspace -t vpid -t vtid -t perf:thread:cycles
lttng start
lttng stop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20181024/0207c382/attachment.html>


More information about the lttng-dev mailing list