diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-record.c | 4 |
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 | ||
284 | try_again: | 284 | try_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++) |