From: Martin Hunt <hunt@redhat.com>
To: Sanket Somnath Hase <sanket@cmu.edu>
Cc: systemtap@sourceware.org
Subject: Re: stap -x option
Date: Fri, 27 Jul 2007 19:14:00 -0000 [thread overview]
Message-ID: <1185560612.14386.6.camel@dragon> (raw)
In-Reply-To: <9056.148.87.1.170.1185559171.squirrel@148.87.1.170>
On Fri, 2007-07-27 at 13:59 -0400, Sanket Somnath Hase wrote:
> Hi folks,
>
> a ) I was curious to know if we can provide more than one target to stap.
> Say I want to run the same script for more than one processes .
-x is probably not needed now that we handle command line args. However
it is a nice complement to -c.
Anyway, what you want is easy to do use command line args. For example,
probe begin {
printf("tracing pids %d and %d\n", $1, $2)
}
probe syscall.open {
p = pid()
if (p == $1 || p == $2)
printf("%d: open (%s)\n", p, argstr)
}
Save the above as trace.stp and then
> stap trace.stp 123 456
>
> b) Is there any benefit in running single script ( effectively single kernel module )
> for all the processes under consideration against running same script for each process
> individually ( and effectively having many kernel modules which look for same set of
> events but for different targets ).
Obviously multiple scripts will use more system resources. Other than
that, it is really up to you. If you are doing the same for all
processes then it makes the most sense to have one script.
Martin
next prev parent reply other threads:[~2007-07-27 18:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 18:23 Sanket Somnath Hase
2007-07-27 19:14 ` Martin Hunt [this message]
2007-07-28 17:47 ` Mike Mason
2007-07-28 0:05 ` William Cohen
2007-07-28 3:50 ` Sanket Somnath Hase
2007-07-28 21:22 ` Mike Mason
2007-07-28 21:46 ` 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=1185560612.14386.6.camel@dragon \
--to=hunt@redhat.com \
--cc=sanket@cmu.edu \
--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).