diff --git a/[refs] b/[refs] index 8d97c0ce9c18..f802f8590d98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 856e96608a72412d319e498a3a7c557571f811bd +refs/heads/master: 60ab271617cec607380099f3ed8e84916e48323b diff --git a/trunk/tools/perf/builtin-record.c b/trunk/tools/perf/builtin-record.c index 9b7c6d887d5a..63136d0534d4 100644 --- a/trunk/tools/perf/builtin-record.c +++ b/trunk/tools/perf/builtin-record.c @@ -278,7 +278,7 @@ static void create_counter(int counter, int cpu, pid_t pid) 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, const char **argv) } - 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++)