From: Deng-Cheng Zhu <dczhu@mips.com>
To: <linux-kernel@vger.kernel.org>
Cc: Deng-Cheng Zhu <dczhu@mips.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: [RFC PATCH 2/2] tools/perf: Make group_fd static and move its place in __perf_evsel__open()
Date: Mon, 24 Oct 2011 18:57:00 +0800 [thread overview]
Message-ID: <1319453820-12992-3-git-send-email-dczhu@mips.com> (raw)
In-Reply-To: <1319453820-12992-1-git-send-email-dczhu@mips.com>
__perf_evsel__open() is called per event, it does not work for all the
grouped events at one time. So, currently group_fd will alway be -1 for
the events in a group. This patch fixes it.
Signed-off-by: Deng-Cheng Zhu <dczhu@mips.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
---
tools/perf/util/evsel.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index e389815..7bd0d9d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -219,9 +219,8 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
}
for (cpu = 0; cpu < cpus->nr; cpu++) {
- int group_fd = -1;
-
for (thread = 0; thread < threads->nr; thread++) {
+ static int group_fd = -1;
if (!evsel->cgrp)
pid = threads->map[thread];
--
1.7.1
next prev parent reply other threads:[~2011-10-24 10:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 10:56 [RFC PATCH 0/2] tools/perf: fix the event grouping functionality Deng-Cheng Zhu
2011-10-24 10:56 ` [RFC PATCH 1/2] tools/perf: Don't set attr->disabled when doing grouping Deng-Cheng Zhu
2011-10-24 14:19 ` David Ahern
2011-10-25 7:26 ` Peter Zijlstra
2011-10-24 10:57 ` Deng-Cheng Zhu [this message]
2011-10-24 14:03 ` [RFC PATCH 2/2] tools/perf: Make group_fd static and move its place in __perf_evsel__open() Arnaldo Carvalho de Melo
2011-10-25 15:23 ` Arnaldo Carvalho de Melo
2011-10-26 6:26 ` Deng-Cheng Zhu
2011-10-26 11:18 ` Arnaldo Carvalho de Melo
2011-10-26 11:21 ` Arnaldo Carvalho de Melo
2011-10-26 13:14 ` Zhu, DengCheng
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=1319453820-12992-3-git-send-email-dczhu@mips.com \
--to=dczhu@mips.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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®