From: Ingo Molnar <mingo@elte.hu>
To: "J K Rai" <jk.anurag@yahoo.com>, "Mike Galbraith" <efault@gmx.de>,
=?unknown-8bit?B?RnLDqWTDqXJpYw==?= Weisbecker
<fweisbec@gmail.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: Instantaneous snapshot of CPU schedule
Date: Sun, 8 Nov 2009 10:48:27 +0100 [thread overview]
Message-ID: <20091108094827.GB2845@elte.hu> (raw)
In-Reply-To: <256042.70547.qm@web94710.mail.in2.yahoo.com>
* J K Rai <jk.anurag@yahoo.com> wrote:
> Hello
>
> Is there any utility using which we can take current (instantaneous)
> snapshot of process schedule on the linux based system from user land.
> Like use a system call or command to know what is running on each of
> the cpus 0..n-1 (assuming n cpus in the system). Output could be like
> tuple (pid, cpu_no).
>
> If such utility does not exist then kindly throw some light / ideas so
> that it could be implemented.
We have a tool that can record scheduling events and analyze/display
them, see:
perf sched record
perf sched latency
perf sched map
perf sched trace
perf sched replay
the latest version is in:
http://people.redhat.com/mingo/tip.git/README
do 'cd tools/perf; make -j install' to get the 'perf' command.
Now, your specific question was 'instantaneous'. I wouldnt mind such an
extension to 'perf sched record':
perf sched record --snapshot
or so. Then 'perf sched map' would show which task is running on which
CPU. Other output modes would be possible too.
Would you be interested in extending 'perf sched' in such a fashion?
Ingo
prev parent reply other threads:[~2009-11-08 9:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 7:44 J K Rai
2009-10-27 10:36 ` Alan Cox
2009-11-08 9:48 ` Ingo Molnar [this message]
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=20091108094827.GB2845@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=jk.anurag@yahoo.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®