From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Arnaldo Carvalho de Melo" <acme@infradead.org>,
mingo@elte.hu, "Paul Mackerras" <paulus@samba.org>,
"David S. Miller" <davem@davemloft.net>,
perfmon2-devel@lists.sf.net
Subject: Re: [RFC] perf: perf record sets inherit by default
Date: Tue, 11 May 2010 16:48:02 +0200 [thread overview]
Message-ID: <1273589282.1810.10.camel@laptop> (raw)
In-Reply-To: <AANLkTinsEANHEicdjOaE6jwUa0bVqH5PBwuGQ3_L59hT@mail.gmail.com>
On Tue, 2010-05-11 at 16:04 +0200, Stephane Eranian wrote:
> Hi,
>
>
> I am confused by the inheritance cmd line option of perf record:
>
> $ perf record -h
> usage: perf record [<options>] [<command>]
> or: perf record [<options>] -- <command> [<options>]
>
> -e, --event <event> event selector. use 'perf list' to list
> available events
> --filter <filter>
> event filter
> -p, --pid <n> record events on existing process id
> -t, --tid <n> record events on existing thread id
> -r, --realtime <n> collect data with this RT SCHED_FIFO priority
> -R, --raw-samples collect raw sample records from all opened counters
> -a, --all-cpus system-wide collection from all CPUs
> -A, --append append to the output file to do incremental profiling
> -C, --profile_cpu <n>
> CPU to profile on
> -f, --force overwrite existing data file (deprecated)
> -c, --count event period to sample
> -o, --output <file> output file name
> -i, --inherit child tasks inherit counters
>
> This leads to believe that by default inheritance in children is off.
>
> However, builtin-record.c says:
>
> static bool inherit = true;
>
> If that's the case, what's the point of the -i option?
Right, I think we should invert that, does --no-inherit work?
> Another side effect of inheritance is that in per-thread mode,
> perf creates as many "sessions" as you have CPUs. So
> on a 16-way processor, sampling on cycles, perf creates
> 16 events and 16 x 2-page sampling buffers. That's a lot of
> resources consumed if I am just interested in monitoring
> a single-threaded workload.
Right, but I think the default of inherit is right, and once you do that
you basically have to do the per-task-per-cpu thing, otherwise your
fancy 16-way will start spending most of its time in cacheline bounces.
That said, !inherit wouldn't need that, so a patch doing that would be
nice.
next prev parent reply other threads:[~2010-05-11 14:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 14:04 [RFC] perf: perf record sets inherit by default Stephane Eranian
2010-05-11 14:48 ` Peter Zijlstra [this message]
2010-05-17 14:25 ` Stephane Eranian
2010-05-17 16:48 ` Peter Zijlstra
2010-05-18 17:16 ` [tip:perf/core] perf: Optimize buffer placement by allocating buffers NUMA aware tip-bot for Peter Zijlstra
2010-05-11 15:00 ` [RFC] perf: perf record sets inherit by default Arnaldo Carvalho de Melo
2010-05-11 15:13 ` Peter Zijlstra
2010-05-11 15:17 ` Stephane Eranian
2010-05-11 15:50 ` Arnaldo Carvalho de Melo
2010-05-11 15:52 ` Peter Zijlstra
2010-05-11 15:55 ` Stephane Eranian
2010-05-11 15:59 ` Arnaldo Carvalho de Melo
2010-05-11 15:56 ` Arnaldo Carvalho de Melo
2010-05-11 16:01 ` Stephane Eranian
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=1273589282.1810.10.camel@laptop \
--to=peterz@infradead.org \
--cc=acme@infradead.org \
--cc=davem@davemloft.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sf.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.