[lttng-dev] lttng-track on userspace channel
Deneau, Tom
tom.deneau at amd.com
Wed May 31 23:28:45 UTC 2017
I am using lttng 2.9.4.
I have a server database daemon with many threads and I would like to track events on a smaller subset of those threads.
I noticed that on the kernel channel I can use lttng track --pid=123,124,125
and this will trace kernel events for just those TIDS (in spite of the documentation saying it will track whole pids).
But I am happy because tid tracking is what I want.
However, is there an equivalent way to track certain tids on the userspace channel? I find that if I use
lttng track -u --pid=xxx
it just tracks all the tids under that pid.
Here is my script (where 79653 is a single tid). In this case it traces only kernel events on that tid.
-----------
lttng create
lttng enable-channel u -u --num-subbuf 64 --subbuf-size 512k
lttng enable-channel k -k --num-subbuf 64 --subbuf-size 512k
lttng add-context -k -c k -t tid -t pid
lttng add-context -u -c u -t vtid -t vpid
lttng enable-event -u -c u -a
lttng enable-event -k -c k --syscall futex
lttng track -k --pid=79653
lttng track -u --pid=79653
lttng start
sleep 1.0
lttng stop
lttng destroy
-- Tom Deneau
More information about the lttng-dev
mailing list