From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Will Deacon <will.deacon@arm.com>
Cc: "mingo@elte.hu" <mingo@elte.hu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
gregkh@suse.de, Arnaldo Carvalho de Melo <acme@infradead.org>
Subject: Re: perf event group siblings not counting in mainline
Date: Tue, 10 Jan 2012 12:16:28 +0100 [thread overview]
Message-ID: <1326194188.2442.106.camel@twins> (raw)
In-Reply-To: <20120110110942.GB24180@mudshark.cambridge.arm.com>
On Tue, 2012-01-10 at 11:09 +0000, Will Deacon wrote:
> On Sat, Dec 24, 2011 at 12:54:15PM +0000, Will Deacon wrote:
> > If I try using perf with event groups on a mainline kernel, only the group
> > leader counts:
> >
> >
> > linaro@mashed-potato:~$ perf stat --no-scale -g -e task-clock -e cpu-clock -e cs -- ls
> > hwb linux
> >
> > Performance counter stats for 'ls':
> >
> > 17.545541 task-clock # 0.634 CPUs utilized
> > 0.000000 cpu-clock
> > 0 cs # 0.000 M/sec
> >
> > 0.027684984 seconds time elapsed
> >
> >
> > This is fixed by b79387ef ("perf: Fix enable_on_exec for sibling events")
> > in -next (20111222) but I can't see this queued anywhere for 3.2 (I thought
> > I might see it in -rc7).
> >
> > Is this going in for the final cut, or will groups just be borked until 3.3?
>
> Now that 3.2 is out with this regression, would it be possible to get this
> (b79387ef ("perf: Fix enable_on_exec for sibling events")) into -stable please?
How can this be a regression? Its always been like that. At worst its a
broken new feature.
Also, you really shouldn't set enable_on_exec on non group leaders,
that's just daft. But yes that patch sorts it. Something like the below
should too.
---
tools/perf/builtin-stat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f5d2a63..623519f 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -298,7 +298,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel,
group, group_fd);
if (target_pid == -1 && target_tid == -1) {
attr->disabled = 1;
- attr->enable_on_exec = 1;
+ attr->enable_on_exec = !group_fd;
}
return perf_evsel__open_per_thread(evsel, evsel_list->threads,
next prev parent reply other threads:[~2012-01-10 11:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-24 12:54 Will Deacon
2012-01-10 11:09 ` Will Deacon
2012-01-10 11:16 ` Peter Zijlstra [this message]
2012-01-10 11:56 ` Will Deacon
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=1326194188.2442.106.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@infradead.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=will.deacon@arm.com \
/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®