aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-12-16 11:55:56 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-16 12:30:13 -0500
commit60ab271617cec607380099f3ed8e84916e48323b (patch)
treefc43fd9f59e2743239c1c24efaf8686e9bc30f99 /tools
parent856e96608a72412d319e498a3a7c557571f811bd (diff)
perf record: Use per-task-per-cpu events for inherited events
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> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: fweisbec@gmail.com Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20091216165904.987643843@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-record.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9b7c6d887d5a..63136d0534d4 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -278,7 +278,7 @@ static void create_counter(int counter, int cpu, pid_t pid)
278 278
279 attr->mmap = track; 279 attr->mmap = track;
280 attr->comm = track; 280 attr->comm = track;
281 attr->inherit = (cpu < 0) && inherit; 281 attr->inherit = inherit;
282 attr->disabled = 1; 282 attr->disabled = 1;
283 283
284try_again: 284try_again:
@@ -537,7 +537,7 @@ static int __cmd_record(int argc __used, const char **argv)
537 } 537 }
538 538
539 539
540 if (!system_wide || profile_cpu != -1) { 540 if ((!system_wide && !inherit) || profile_cpu != -1) {
541 open_counters(profile_cpu, target_pid); 541 open_counters(profile_cpu, target_pid);
542 } else { 542 } else {
543 for (i = 0; i < nr_cpus; i++) 543 for (i = 0; i < nr_cpus; i++)