Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: tom.deneau@amd.com (Deneau, Tom)
Subject: [lttng-dev] lttng-track on userspace channel
Date: Wed, 31 May 2017 23:28:45 +0000	[thread overview]
Message-ID: <CY4PR12MB191256DF4AFE069B55B133FB9BF10@CY4PR12MB1912.namprd12.prod.outlook.com> (raw)

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


                 reply	other threads:[~2017-05-31 23:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CY4PR12MB191256DF4AFE069B55B133FB9BF10@CY4PR12MB1912.namprd12.prod.outlook.com \
    --to=tom.deneau@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox