From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Arun Sharma <aruns@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
davem@davemloft.net, fweisbec@gmail.com
Subject: Re: [PATCH] perf: implement recording/reporting per-cpu samples
Date: Thu, 27 May 2010 18:53:33 -0300 [thread overview]
Message-ID: <20100527215333.GM9874@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTim4UdMxxPkhHjVd_433Uk2QoVXBTy44KUlRBNSX@mail.gmail.com>
Em Thu, May 27, 2010 at 01:54:46PM -0700, Arun Sharma escreveu:
> On Thu, May 27, 2010 at 11:41 AM, Arnaldo Carvalho de Melo
> <acme@ghostprotocols.net> wrote:
> > Em Wed, May 05, 2010 at 11:16:12AM -0700, Arun Sharma escreveu:
> >> On Tue, May 04, 2010 at 11:16:38AM +0200, Peter Zijlstra wrote:
> >> > > In a shared multi-core environment, users want to analyze why their
> >> > > program was slow. In particular, if the code ran slower only on
> >> > > certain CPUs due to interference from other programs or kernel
> >> > > threads, they want to know that.
> >> > But for that you use perf record -a, right? So you record all cpus
> >> > allways -- otherwise there is no telling what was happening to make it
> >> > go slow.
> >> The updated patch records the CPU only in the system_wide mode.
> > I think this should be done only if you'll actually need it, as in,
> > "cpu" is one of the sort keys, but that can be done as a followup patch,
> > but there is another thing I think you need to change, see below.
> How would you know if the user is going to sort by cpu at "perf record" time?
Excellent point, but as time goes on we may end up selecting all the
optionally selectable fields, so perhaps we should tell that to record
and then check at report time if it is present?
For instance, PERF_SAMPLE_TIME would be interesting too to check if
there is no reordering of events, etc, but should we have it always
enabled?
If we used something like:
perf record --sort cpu,comm ...
We would be able for instance, to avoid having MMAP events that wouldn't
be used at all, reducing PERF_SAMPLE_TID too, I guess, and then the per
event cost would be reduced, on the other hand, if we want to have
maximum flexibility at 'report' time, we could use:
perf record --sort all
With the default remaining the one we have.
perf record --sort +cpu
could be used to add one field to the set of fields in place, whatever
we get the default to be at any point in time.
perf record could as well, if no --sort is presented, infer a reasonable
one from the set of fields present in sample_type, etc.
Of course the feature implemented as-is by your patch is useful and we
need to support it, it can even be like you posted, but I wanted to
express this feeling about per event cost.
> Thanks for taking care of the second part.
Will try to get it done now and will send for review.
- Arnaldo
next prev parent reply other threads:[~2010-05-27 21:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 20:38 [PATCH] perf: implement recording/reporting per-cpu samples Arun Sharma
2010-05-03 20:42 ` Peter Zijlstra
2010-05-03 20:53 ` Arun Sharma
2010-05-04 9:16 ` Peter Zijlstra
2010-05-05 18:16 ` Arun Sharma
2010-05-27 18:08 ` Peter Zijlstra
2010-05-27 18:28 ` Arnaldo Carvalho de Melo
2010-05-27 18:41 ` Arnaldo Carvalho de Melo
2010-05-27 20:54 ` Arun Sharma
2010-05-27 21:53 ` Arnaldo Carvalho de Melo [this message]
2010-05-27 23:16 ` Arnaldo Carvalho de Melo
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=20100527215333.GM9874@ghostprotocols.net \
--to=acme@ghostprotocols.net \
--cc=aruns@google.com \
--cc=davem@davemloft.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.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 NNTP newsgroup(s).