From: Frederic Weisbecker <fweisbec@gmail.com>
To: David Ahern <daahern@cisco.com>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
peterz@infradead.org, acme@ghostprotocols.net, paulus@samba.org,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 3/3] perf events: add timehist option to record and report
Date: Mon, 21 Feb 2011 22:13:55 +0100 [thread overview]
Message-ID: <20110221211352.GA3583@nowhere> (raw)
In-Reply-To: <4D5ECE3E.4040407@cisco.com>
On Fri, Feb 18, 2011 at 12:53:34PM -0700, David Ahern wrote:
>
>
> On 02/18/11 12:24, Frederic Weisbecker wrote:
> >> We want not only context-switch events, but the stack trace at the
> >> switch. For example, with the stack trace you can see preemption -- when
> >> a process got booted by another and where the booted process is at the
> >> time. You can see not only which system call caused an ap to block
> >> (e.g., an ioctl) but the full code path leading to the block.
> >
> > You can recognize preemption a the context switch tracepoint: if the state
> > of the scheduled out task is R (TASK_RUNNING), which means it doesn't go
> > to sleep but gets preempted, with an explicit preemption point like cond_resched(),
> > or a more implicit one: spin_unlock(), preempt_enable(), an interrupt, ...
> > Or it has been woken up while it was about to sleep, but it doesn't make much
> > difference.
> >
> > If you want to know when a process is booted by another you can use the
> > fork tracepoint, or sched:wake_up_new, etc...
> >
> > And you can use syscall tracepoints to get the syscalls you want.
> >
> > I don't see much the point for you to use stacktraces. But if you
> > do, then rather add this support to perf script, in our scripting
> > framework.
>
> It's more the simplicity of what we are using today. 1 command, 1 event
> being monitored:
>
> perf record -ag -e cs -c 1
>
> A wealth of information. That command shows preemption, stack traces
> only for context-switches (not all of the syscalls which is
> overwhelming) and opens the door for other analysis. One data set.
> Simple. Focused.
Right. Then why not adding support to stacktraces in perf script?
Seems it's the only missing thing to achieve what you want.
> > Because what you've done is basically to add tracing support to
> > perf report. But we have perf script for that already. It only focuses
> > on tracepoint events but they are those people are interested in
> > because they show logical events in the kernel. I guess
> > people are not interested in cpu-cycles overflows events or so as
> > they don't show a state change in the kernel.
>
> I have always referred to this as pretty printing each sample recorded
> as opposed to summarizing into a histogram. With that approach you have
> dictated the analysis of the data - a histogram summary. By printing
> each sample with address-symbol conversions we can look at it in
> whatever angle we need to make sense of it.
I'm not dictating any analysis. You can can just launch
perf script without script and it will display the events,
like you want.
Just try:
perf record -a -e sched:sched_switch
perf script
You can extend it to print addresses or symbols or even stacktraces.
It just seems to me the right place to do so. Not perf report that is
about histograms.
next prev parent reply other threads:[~2011-02-21 21:14 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 5:53 [PATCH 0/3] perf events: Add realtime clock event and timehist option David Ahern
2011-02-18 5:53 ` [PATCH 1/3] perf events: fix WARN_ON_ONCE for 64-bit raw data, SW events David Ahern
2011-02-18 11:00 ` Peter Zijlstra
2011-02-18 14:33 ` David Ahern
2011-02-18 14:53 ` Arnaldo Carvalho de Melo
2011-02-18 15:01 ` Peter Zijlstra
2011-02-18 17:04 ` Arnaldo Carvalho de Melo
2011-02-18 17:13 ` Peter Zijlstra
2011-02-18 17:15 ` David Ahern
2011-02-18 17:17 ` David Ahern
2011-02-18 14:55 ` Peter Zijlstra
2011-02-18 15:28 ` David Ahern
2011-02-18 15:51 ` Peter Zijlstra
2011-02-18 5:53 ` [PATCH 2/3] perf events: Introduce realtime clock event David Ahern
2011-02-18 11:14 ` Peter Zijlstra
2011-02-18 14:39 ` David Ahern
2011-02-18 14:58 ` Peter Zijlstra
2011-02-18 15:35 ` David Ahern
2011-02-18 15:39 ` David Ahern
2011-02-20 12:49 ` Ingo Molnar
2011-02-18 5:53 ` [PATCH 3/3] perf events: add timehist option to record and report David Ahern
2011-02-18 7:06 ` Ingo Molnar
2011-02-18 14:28 ` David Ahern
2011-02-18 17:59 ` Frederic Weisbecker
2011-02-18 18:07 ` David Ahern
2011-02-18 18:39 ` Peter Zijlstra
2011-02-18 18:45 ` David Ahern
2011-02-19 9:32 ` Ingo Molnar
2011-02-19 14:38 ` Arnaldo Carvalho de Melo
2011-02-18 19:24 ` Frederic Weisbecker
2011-02-18 19:53 ` David Ahern
2011-02-21 21:13 ` Frederic Weisbecker [this message]
2011-02-18 18:41 ` Arnaldo Carvalho de Melo
2011-02-18 18:47 ` David Ahern
2011-02-18 18:53 ` David Ahern
2011-02-18 19:06 ` Arnaldo Carvalho de Melo
2011-02-18 19:29 ` Frederic Weisbecker
2011-02-18 20:30 ` Arnaldo Carvalho de Melo
2011-02-21 21:17 ` Frederic Weisbecker
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=20110221211352.GA3583@nowhere \
--to=fweisbec@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=acme@redhat.com \
--cc=daahern@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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 NNTP newsgroup(s).