aboutsummaryrefslogtreecommitdiff
path: root/Documentation/perf_counter/builtin-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/perf_counter/builtin-record.c')
-rw-r--r--Documentation/perf_counter/builtin-record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c
index efa2eb498e9..bf59df5bddf 100644
--- a/Documentation/perf_counter/builtin-record.c
+++ b/Documentation/perf_counter/builtin-record.c
@@ -430,7 +430,7 @@ static int __cmd_record(int argc, const char **argv)
}
if (!system_wide) {
- open_counters(-1, target_pid != -1 ? target_pid : 0);
+ open_counters(-1, target_pid != -1 ? target_pid : getpid());
} else for (i = 0; i < nr_cpus; i++)
open_counters(i, target_pid);