From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
fweisbec@gmail.com, linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 3/3] perf-record: Use per-task-per-cpu events for inherited events
Date: Wed, 16 Dec 2009 17:55:56 +0100 [thread overview]
Message-ID: <20091216165904.987643843@chello.nl> (raw)
In-Reply-To: <20091216165553.802559834@chello.nl>
[-- Attachment #1: perf3.patch --]
[-- Type: text/plain, Size: 974 bytes --]
Create events with a pid and cpu contraint for inherited events so
that we get a stream per cpu, instead of all cpus contending on a
single stream.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
tools/perf/builtin-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/tools/perf/builtin-record.c
===================================================================
--- linux-2.6.orig/tools/perf/builtin-record.c
+++ linux-2.6/tools/perf/builtin-record.c
@@ -278,7 +278,7 @@ static void create_counter(int counter,
attr->mmap = track;
attr->comm = track;
- attr->inherit = (cpu < 0) && inherit;
+ attr->inherit = inherit;
attr->disabled = 1;
try_again:
@@ -537,7 +537,7 @@ static int __cmd_record(int argc __used,
}
- if (!system_wide || profile_cpu != -1) {
+ if ((!system_wide && !inherit) || profile_cpu != -1) {
open_counters(profile_cpu, target_pid);
} else {
for (i = 0; i < nr_cpus; i++)
--
next prev parent reply other threads:[~2009-12-16 17:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 16:55 [PATCH 0/3] perf per-task-per-cpu support Peter Zijlstra
2009-12-16 16:55 ` [PATCH 1/3] perf: Allow per-task-per-cpu counters Peter Zijlstra
2009-12-16 17:34 ` [tip:perf/urgent] perf events: " tip-bot for Peter Zijlstra
2009-12-16 16:55 ` [PATCH 2/3] perf-record: Properly synchronize child creation Peter Zijlstra
2009-12-16 17:34 ` [tip:perf/urgent] perf record: " tip-bot for Peter Zijlstra
2009-12-16 16:55 ` Peter Zijlstra [this message]
2009-12-16 17:34 ` [tip:perf/urgent] perf record: Use per-task-per-cpu events for inherited events tip-bot for Peter Zijlstra
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=20091216165904.987643843@chello.nl \
--to=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--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®