* [PATCH v2] perf tools: make -C consistent across commands (for cpu list arg)
@ 2011-11-13 18:30 David Ahern
2011-11-17 23:10 ` David Ahern
2011-12-05 13:00 ` [tip:perf/core] " tip-bot for David Ahern
0 siblings, 2 replies; 4+ messages in thread
From: David Ahern @ 2011-11-13 18:30 UTC (permalink / raw)
To: acme, mingo, linux-kernel; +Cc: peterz, fweisbec, David Ahern
Currently the meaning of -C varies by perf command: for perf-top,
perf-stat, perf-record it means cpu list. For perf-report it
means comm list. Then perf-annotate, perf-report and perf-script
use -c for cpu list.
Fix annotate, report and script to use -C for cpu list to be
consistent with top, stat and record. This means report needs
to use -c for comm list which does introduce a backward
compatibility change.
v1 -> v2
- update perf-script.txt too
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/Documentation/perf-annotate.txt | 2 +-
tools/perf/Documentation/perf-report.txt | 4 ++--
tools/perf/Documentation/perf-script.txt | 2 +-
tools/perf/builtin-annotate.c | 2 +-
tools/perf/builtin-report.c | 4 ++--
tools/perf/builtin-script.c | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt
index fe6762e..476029d 100644
--- a/tools/perf/Documentation/perf-annotate.txt
+++ b/tools/perf/Documentation/perf-annotate.txt
@@ -66,7 +66,7 @@ OPTIONS
used. This interfaces starts by centering on the line with more
samples, TAB/UNTAB cycles through the lines with more samples.
--c::
+-C::
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
be provided as a comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2. Default is to report samples on all
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 212f24d..dc85392 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -39,7 +39,7 @@ OPTIONS
-T::
--threads::
Show per-thread event counters
--C::
+-c::
--comms=::
Only consider symbols in these comms. CSV that understands
file://filename entries.
@@ -128,7 +128,7 @@ OPTIONS
--symfs=<directory>::
Look for files with symbols relative to this directory.
--c::
+-C::
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
be provided as a comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2. Default is to report samples on all
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index dec87ec..3613b0a 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -182,7 +182,7 @@ OPTIONS
--hide-call-graph::
When printing symbols do not display call chain.
--c::
+-C::
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
be provided as a comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2. Default is to report samples on all
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 46b4c24..1b5e68c 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -269,7 +269,7 @@ static const struct option options[] = {
"print matching source lines (may be slow)"),
OPT_BOOLEAN('P', "full-paths", &full_paths,
"Don't shorten the displayed pathnames"),
- OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
+ OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
"Look for files with symbols relative to this directory"),
OPT_BOOLEAN(0, "source", &symbol_conf.annotate_src,
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 4d7c834..85a3160 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -474,7 +474,7 @@ static const struct option options[] = {
OPT_BOOLEAN('G', "inverted", &inverted_callchain, "alias for inverted call graph"),
OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
"only consider symbols in these dsos"),
- OPT_STRING('C', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
+ OPT_STRING('c', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
"only consider symbols in these comms"),
OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]",
"only consider these symbols"),
@@ -488,7 +488,7 @@ static const struct option options[] = {
"Only display entries resolved to a symbol"),
OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
"Look for files with symbols relative to this directory"),
- OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
+ OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_BOOLEAN('I', "show-info", &show_full_info,
"Display extended information about perf.data file"),
OPT_BOOLEAN(0, "source", &symbol_conf.annotate_src,
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 2f62a29..01329ca 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1083,7 +1083,7 @@ static const struct option options[] = {
OPT_CALLBACK('f', "fields", NULL, "str",
"comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace,raw. Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,addr",
parse_output_fields),
- OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
+ OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_BOOLEAN('I', "show-info", &show_full_info,
"display extended information from perf.data file"),
OPT_END()
--
1.7.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] perf tools: make -C consistent across commands (for cpu list arg)
2011-11-13 18:30 [PATCH v2] perf tools: make -C consistent across commands (for cpu list arg) David Ahern
@ 2011-11-17 23:10 ` David Ahern
2011-11-18 0:41 ` Arnaldo Carvalho de Melo
2011-12-05 13:00 ` [tip:perf/core] " tip-bot for David Ahern
1 sibling, 1 reply; 4+ messages in thread
From: David Ahern @ 2011-11-17 23:10 UTC (permalink / raw)
To: acme; +Cc: mingo, linux-kernel, peterz, fweisbec
On 11/13/2011 11:30 AM, David Ahern wrote:
> Currently the meaning of -C varies by perf command: for perf-top,
> perf-stat, perf-record it means cpu list. For perf-report it
> means comm list. Then perf-annotate, perf-report and perf-script
> use -c for cpu list.
>
> Fix annotate, report and script to use -C for cpu list to be
> consistent with top, stat and record. This means report needs
> to use -c for comm list which does introduce a backward
> compatibility change.
Any objections to making this argument consistent? I am waiting to send
a follow-on patch that adds comm filtering to perf-script.
David
>
> v1 -> v2
> - update perf-script.txt too
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
> tools/perf/Documentation/perf-annotate.txt | 2 +-
> tools/perf/Documentation/perf-report.txt | 4 ++--
> tools/perf/Documentation/perf-script.txt | 2 +-
> tools/perf/builtin-annotate.c | 2 +-
> tools/perf/builtin-report.c | 4 ++--
> tools/perf/builtin-script.c | 2 +-
> 6 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt
> index fe6762e..476029d 100644
> --- a/tools/perf/Documentation/perf-annotate.txt
> +++ b/tools/perf/Documentation/perf-annotate.txt
> @@ -66,7 +66,7 @@ OPTIONS
> used. This interfaces starts by centering on the line with more
> samples, TAB/UNTAB cycles through the lines with more samples.
>
> --c::
> +-C::
> --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
> be provided as a comma-separated list with no space: 0,1. Ranges of
> CPUs are specified with -: 0-2. Default is to report samples on all
> diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
> index 212f24d..dc85392 100644
> --- a/tools/perf/Documentation/perf-report.txt
> +++ b/tools/perf/Documentation/perf-report.txt
> @@ -39,7 +39,7 @@ OPTIONS
> -T::
> --threads::
> Show per-thread event counters
> --C::
> +-c::
> --comms=::
> Only consider symbols in these comms. CSV that understands
> file://filename entries.
> @@ -128,7 +128,7 @@ OPTIONS
> --symfs=<directory>::
> Look for files with symbols relative to this directory.
>
> --c::
> +-C::
> --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
> be provided as a comma-separated list with no space: 0,1. Ranges of
> CPUs are specified with -: 0-2. Default is to report samples on all
> diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> index dec87ec..3613b0a 100644
> --- a/tools/perf/Documentation/perf-script.txt
> +++ b/tools/perf/Documentation/perf-script.txt
> @@ -182,7 +182,7 @@ OPTIONS
> --hide-call-graph::
> When printing symbols do not display call chain.
>
> --c::
> +-C::
> --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
> be provided as a comma-separated list with no space: 0,1. Ranges of
> CPUs are specified with -: 0-2. Default is to report samples on all
> diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
> index 46b4c24..1b5e68c 100644
> --- a/tools/perf/builtin-annotate.c
> +++ b/tools/perf/builtin-annotate.c
> @@ -269,7 +269,7 @@ static const struct option options[] = {
> "print matching source lines (may be slow)"),
> OPT_BOOLEAN('P', "full-paths", &full_paths,
> "Don't shorten the displayed pathnames"),
> - OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
> + OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
> OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
> "Look for files with symbols relative to this directory"),
> OPT_BOOLEAN(0, "source", &symbol_conf.annotate_src,
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 4d7c834..85a3160 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -474,7 +474,7 @@ static const struct option options[] = {
> OPT_BOOLEAN('G', "inverted", &inverted_callchain, "alias for inverted call graph"),
> OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
> "only consider symbols in these dsos"),
> - OPT_STRING('C', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
> + OPT_STRING('c', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
> "only consider symbols in these comms"),
> OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]",
> "only consider these symbols"),
> @@ -488,7 +488,7 @@ static const struct option options[] = {
> "Only display entries resolved to a symbol"),
> OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
> "Look for files with symbols relative to this directory"),
> - OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
> + OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
> OPT_BOOLEAN('I', "show-info", &show_full_info,
> "Display extended information about perf.data file"),
> OPT_BOOLEAN(0, "source", &symbol_conf.annotate_src,
> diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> index 2f62a29..01329ca 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -1083,7 +1083,7 @@ static const struct option options[] = {
> OPT_CALLBACK('f', "fields", NULL, "str",
> "comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace,raw. Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,addr",
> parse_output_fields),
> - OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
> + OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
> OPT_BOOLEAN('I', "show-info", &show_full_info,
> "display extended information from perf.data file"),
> OPT_END()
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] perf tools: make -C consistent across commands (for cpu list arg)
2011-11-17 23:10 ` David Ahern
@ 2011-11-18 0:41 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-11-18 0:41 UTC (permalink / raw)
To: David Ahern; +Cc: mingo, linux-kernel, peterz, fweisbec
Em Thu, Nov 17, 2011 at 04:10:24PM -0700, David Ahern escreveu:
> On 11/13/2011 11:30 AM, David Ahern wrote:
> > Currently the meaning of -C varies by perf command: for perf-top,
> > perf-stat, perf-record it means cpu list. For perf-report it
> > means comm list. Then perf-annotate, perf-report and perf-script
> > use -c for cpu list.
> >
> > Fix annotate, report and script to use -C for cpu list to be
> > consistent with top, stat and record. This means report needs
> > to use -c for comm list which does introduce a backward
> > compatibility change.
>
> Any objections to making this argument consistent? I am waiting to send
> a follow-on patch that adds comm filtering to perf-script.
Its OK for perf/core, I'll apply and try to publish what I have
tomorrow.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf tools: make -C consistent across commands (for cpu list arg)
2011-11-13 18:30 [PATCH v2] perf tools: make -C consistent across commands (for cpu list arg) David Ahern
2011-11-17 23:10 ` David Ahern
@ 2011-12-05 13:00 ` tip-bot for David Ahern
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for David Ahern @ 2011-12-05 13:00 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, hpa, mingo, peterz, fweisbec, dsahern, tglx,
mingo
Commit-ID: c8e6672035e84799e6167e933fafedc8e3256973
Gitweb: http://git.kernel.org/tip/c8e6672035e84799e6167e933fafedc8e3256973
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Sun, 13 Nov 2011 11:30:08 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 28 Nov 2011 11:45:53 -0200
perf tools: make -C consistent across commands (for cpu list arg)
Currently the meaning of -C varies by perf command: for perf-top,
perf-stat, perf-record it means cpu list. For perf-report it means comm
list. Then perf-annotate, perf-report and perf-script use -c for cpu
list.
Fix annotate, report and script to use -C for cpu list to be consistent
with top, stat and record. This means report needs to use -c for comm
list which does introduce a backward compatibility change.
v1 -> v2
- update perf-script.txt too
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1321209008-7004-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-annotate.txt | 2 +-
tools/perf/Documentation/perf-report.txt | 4 ++--
tools/perf/Documentation/perf-script.txt | 2 +-
tools/perf/builtin-annotate.c | 2 +-
tools/perf/builtin-report.c | 4 ++--
tools/perf/builtin-script.c | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt
index fe6762e..476029d 100644
--- a/tools/perf/Documentation/perf-annotate.txt
+++ b/tools/perf/Documentation/perf-annotate.txt
@@ -66,7 +66,7 @@ OPTIONS
used. This interfaces starts by centering on the line with more
samples, TAB/UNTAB cycles through the lines with more samples.
--c::
+-C::
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
be provided as a comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2. Default is to report samples on all
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 212f24d..dc85392 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -39,7 +39,7 @@ OPTIONS
-T::
--threads::
Show per-thread event counters
--C::
+-c::
--comms=::
Only consider symbols in these comms. CSV that understands
file://filename entries.
@@ -128,7 +128,7 @@ OPTIONS
--symfs=<directory>::
Look for files with symbols relative to this directory.
--c::
+-C::
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
be provided as a comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2. Default is to report samples on all
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index dec87ec..3613b0a 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -182,7 +182,7 @@ OPTIONS
--hide-call-graph::
When printing symbols do not display call chain.
--c::
+-C::
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
be provided as a comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2. Default is to report samples on all
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index c01139f..d449645 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -274,7 +274,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __used)
"print matching source lines (may be slow)"),
OPT_BOOLEAN('P', "full-paths", &annotate.full_paths,
"Don't shorten the displayed pathnames"),
- OPT_STRING('c', "cpu", &annotate.cpu_list, "cpu", "list of cpus to profile"),
+ OPT_STRING('C', "cpu", &annotate.cpu_list, "cpu", "list of cpus to profile"),
OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
"Look for files with symbols relative to this directory"),
OPT_BOOLEAN(0, "source", &symbol_conf.annotate_src,
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index eef8e42..ece7c5d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -492,7 +492,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
"alias for inverted call graph"),
OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
"only consider symbols in these dsos"),
- OPT_STRING('C', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
+ OPT_STRING('c', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
"only consider symbols in these comms"),
OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]",
"only consider these symbols"),
@@ -506,7 +506,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
"Only display entries resolved to a symbol"),
OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
"Look for files with symbols relative to this directory"),
- OPT_STRING('c', "cpu", &report.cpu_list, "cpu",
+ OPT_STRING('C', "cpu", &report.cpu_list, "cpu",
"list of cpus to profile"),
OPT_BOOLEAN('I', "show-info", &report.show_full_info,
"Display extended information about perf.data file"),
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 5f8afc6..7731a09 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1085,7 +1085,7 @@ static const struct option options[] = {
OPT_CALLBACK('f', "fields", NULL, "str",
"comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace,raw. Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,addr",
parse_output_fields),
- OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
+ OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_BOOLEAN('I', "show-info", &show_full_info,
"display extended information from perf.data file"),
OPT_END()
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-05 13:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-13 18:30 [PATCH v2] perf tools: make -C consistent across commands (for cpu list arg) David Ahern
2011-11-17 23:10 ` David Ahern
2011-11-18 0:41 ` Arnaldo Carvalho de Melo
2011-12-05 13:00 ` [tip:perf/core] " tip-bot for David Ahern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.