perf evsel: Allow specifying if the inherit bit should be set

As this is a per-cpu attribute, we can't set it up in advance and use it
for all the calls.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2011-01-12 00:08:18 -02:00
parent f08199d314
commit 9d04f17817
4 changed files with 16 additions and 14 deletions

View File

@ -169,7 +169,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
PERF_FORMAT_TOTAL_TIME_RUNNING;
if (system_wide)
return perf_evsel__open_per_cpu(evsel, cpus, false);
return perf_evsel__open_per_cpu(evsel, cpus, false, false);
attr->inherit = !no_inherit;
if (target_pid == -1 && target_tid == -1) {
@ -177,7 +177,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
attr->enable_on_exec = 1;
}
return perf_evsel__open_per_thread(evsel, threads, false);
return perf_evsel__open_per_thread(evsel, threads, false, false);
}
/*