Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583600
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/5] perf record: Add -a as a default target |
| Date | 2017-02-17 18:10 +0100 |
| Message-ID | <tbUcG-76j-23@gated-at.bofh.it> (permalink) |
| References | <tbRou-5iA-11@gated-at.bofh.it> <tbRov-5iA-25@gated-at.bofh.it> <tbRHR-5pX-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Feb 17, 2017 at 11:28:14AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 17, 2017 at 03:00:58PM +0100, Jiri Olsa escreveu:
> > Adding system wide (-a) option as a default target
> > if non is specified.
> >
> > # perf record
> > Warning: No target specified, setting system-wide collection (-a).
>
> Ditto, this warning will get annoying after a while...
ok, posting the change with no warning
jirka
---
Adding system wide (-a) option as a default target
if non is specified.
Running 'perf record' will now collect system wide data.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-tq11of2qlz8kxpxzva05d54l@git.kernel.org
---
tools/perf/Documentation/perf-record.txt | 2 +-
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
-a::
--all-cpus::
- System-wide collection from all CPUs.
+ System-wide collection from all CPUs (default if no target is specified).
-p::
--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)
argc = parse_options(argc, argv, record_options, record_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
+
+ /* Make system wide (-a) the default target. */
if (!argc && target__none(&rec->opts.target))
- usage_with_options(record_usage, record_options);
+ rec->opts.target.system_wide = true;
if (nr_cgroups && !rec->opts.target.system_wide) {
usage_with_options_msg(record_usage, record_options,
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] perf tools: Few fixes Jiri Olsa <jolsa@kernel.org> - 2017-02-17 15:10 +0100
[PATCH 3/5] perf tools: Fail on using multiple bits long terms without value Jiri Olsa <jolsa@kernel.org> - 2017-02-17 15:10 +0100
[tip:perf/urgent] perf tools: Fail on using multiple bits long terms without value tip-bot for Jiri Olsa <tipbot@zytor.com> - 2017-02-21 09:20 +0100
[PATCH 5/5] perf record: Add -a as a default target Jiri Olsa <jolsa@kernel.org> - 2017-02-17 15:10 +0100
Re: [PATCH 5/5] perf record: Add -a as a default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-17 15:30 +0100
Re: [PATCH 5/5] perf record: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-17 18:10 +0100
[tip:perf/urgent] perf record: Add -a as default target tip-bot for Jiri Olsa <tipbot@zytor.com> - 2017-02-21 09:20 +0100
[PATCH 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@kernel.org> - 2017-02-17 15:10 +0100
Re: [PATCH 4/5] perf stat: Add -a as a default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-17 15:30 +0100
Re: [PATCH 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-17 15:40 +0100
Re: [PATCH 4/5] perf stat: Add -a as a default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-17 15:50 +0100
Re: [PATCH 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-17 15:50 +0100
[PATCHv2 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-17 18:10 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Boris Petkov <bp@alien8.de> - 2017-02-17 19:20 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Borislav Petkov <bp@alien8.de> - 2017-02-18 19:00 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-20 08:20 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Borislav Petkov <bp@alien8.de> - 2017-02-20 21:40 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 22:30 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Borislav Petkov <bp@alien8.de> - 2017-02-20 23:50 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-21 09:00 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Jiri Olsa <jolsa@redhat.com> - 2017-02-21 12:10 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Borislav Petkov <bp@alien8.de> - 2017-02-21 12:30 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-21 14:40 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Borislav Petkov <bp@alien8.de> - 2017-02-21 15:10 +0100
Re: [PATCHv2 4/5] perf stat: Add -a as a default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-21 15:30 +0100
[tip:perf/urgent] perf stat: Add -a as default target tip-bot for Jiri Olsa <tipbot@zytor.com> - 2017-02-21 09:20 +0100
[PATCH 1/5] perf build: Add special fixdep cleaning rule Jiri Olsa <jolsa@kernel.org> - 2017-02-17 15:10 +0100
[tip:perf/urgent] perf build: Add special fixdep cleaning rule tip-bot for Jiri Olsa <tipbot@zytor.com> - 2017-02-21 09:20 +0100
csiph-web