From: tonyg362 <tonyg3622@yahoo.com>
To: systemtap@sourceware.org
Subject: pid and execname mismatches
Date: Thu, 22 Jul 2010 14:29:00 -0000 [thread overview]
Message-ID: <29237551.post@talk.nabble.com> (raw)
I'm trying to collect the pids and execnames of every process when it enters
the scheduler. The problem is that it seems as though the pid of the process
I use for the -c option always gives me the execname of the stapio process.
I thought maybe there was a problem with looking at the incorrect
task_struct because I am inside the scheduler, so I got this info directly
from the prev task_struct using context variables. e.g.
global pidlist
probe kernel.statement("schedule@kernel/sched.c:line#") {
ppid = $prev->tgid
name = kernel_string($prev->comm)
if (!([ppid] in pidlist))
pidlist[ppid] = name
}
probe end {
foreach ([pid] in pidlist)
printf("%d:%s\n", pid, pidlist[pid])
}
However, if I just hook into system calls and do a similar thing the pids
and execnames match up correctly. Am I doing something wrong?
--
View this message in context: http://old.nabble.com/pid-and-execname-mismatches-tp29237551p29237551.html
Sent from the Sourceware - systemtap mailing list archive at Nabble.com.
next reply other threads:[~2010-07-22 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 14:29 tonyg362 [this message]
2010-07-22 14:50 ` Mark Wielaard
2010-07-22 15:12 ` Frank Ch. Eigler
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=29237551.post@talk.nabble.com \
--to=tonyg3622@yahoo.com \
--cc=systemtap@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).