diff options
-rw-r--r-- | tools/perf/Documentation/perf-record.txt | 2 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 27256bc68eda..b16003ec14a7 100644 --- a/tools/perf/Documentation/perf-record.txt +++ b/tools/perf/Documentation/perf-record.txt | |||
@@ -157,7 +157,7 @@ OPTIONS | |||
157 | 157 | ||
158 | -a:: | 158 | -a:: |
159 | --all-cpus:: | 159 | --all-cpus:: |
160 | System-wide collection from all CPUs. | 160 | System-wide collection from all CPUs (default if no target is specified). |
161 | 161 | ||
162 | -p:: | 162 | -p:: |
163 | --pid=:: | 163 | --pid=:: |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 6cd6776052e7..b87bbef73394 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -1677,8 +1677,10 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1677 | 1677 | ||
1678 | argc = parse_options(argc, argv, record_options, record_usage, | 1678 | argc = parse_options(argc, argv, record_options, record_usage, |
1679 | PARSE_OPT_STOP_AT_NON_OPTION); | 1679 | PARSE_OPT_STOP_AT_NON_OPTION); |
1680 | |||
1681 | /* Make system wide (-a) the default target. */ | ||
1680 | if (!argc && target__none(&rec->opts.target)) | 1682 | if (!argc && target__none(&rec->opts.target)) |
1681 | usage_with_options(record_usage, record_options); | 1683 | rec->opts.target.system_wide = true; |
1682 | 1684 | ||
1683 | if (nr_cgroups && !rec->opts.target.system_wide) { | 1685 | if (nr_cgroups && !rec->opts.target.system_wide) { |
1684 | usage_with_options_msg(record_usage, record_options, | 1686 | usage_with_options_msg(record_usage, record_options, |