* [PATCH] perf stat: Fix recort_usage typo
@ 2016-01-12 9:35 Jiri Olsa
2016-01-12 14:15 ` Arnaldo Carvalho de Melo
2016-01-13 9:39 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Olsa @ 2016-01-12 9:35 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
Markus Trippelsdorf
Markus reported gcc 6 complains when compiling perf stat command:
builtin-stat.c:1591:27: error: ‘recort_usage’ defined but not used
[-Werror=unused-const-variable]
static const char * const recort_usage[] = {
^~~~~~~~~~~~
I fixed the typo and realized we already export record_usage,
so I also prefixed it with stat (and included report_usage).
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Link: http://lkml.kernel.org/n/tip-3c3vkc6bejfsuxxgkcwxllsc@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/builtin-stat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 7f568244662b..038e877081b6 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1588,7 +1588,7 @@ static int add_default_attributes(void)
return perf_evlist__add_default_attrs(evsel_list, very_very_detailed_attrs);
}
-static const char * const recort_usage[] = {
+static const char * const stat_record_usage[] = {
"perf stat record [<options>]",
NULL,
};
@@ -1611,7 +1611,7 @@ static int __cmd_record(int argc, const char **argv)
struct perf_session *session;
struct perf_data_file *file = &perf_stat.file;
- argc = parse_options(argc, argv, stat_options, record_usage,
+ argc = parse_options(argc, argv, stat_options, stat_record_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
if (output_name)
@@ -1745,7 +1745,7 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
return set_maps(st);
}
-static const char * const report_usage[] = {
+static const char * const stat_report_usage[] = {
"perf stat report [<options>]",
NULL,
};
@@ -1779,7 +1779,7 @@ static int __cmd_report(int argc, const char **argv)
struct stat st;
int ret;
- argc = parse_options(argc, argv, options, report_usage, 0);
+ argc = parse_options(argc, argv, options, stat_report_usage, 0);
if (!input_name || !strlen(input_name)) {
if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode))
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf stat: Fix recort_usage typo
2016-01-12 9:35 [PATCH] perf stat: Fix recort_usage typo Jiri Olsa
@ 2016-01-12 14:15 ` Arnaldo Carvalho de Melo
2016-01-13 9:39 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-01-12 14:15 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
Markus Trippelsdorf
Em Tue, Jan 12, 2016 at 10:35:29AM +0100, Jiri Olsa escreveu:
> Markus reported gcc 6 complains when compiling perf stat command:
>
> builtin-stat.c:1591:27: error: ‘recort_usage’ defined but not used
> [-Werror=unused-const-variable]
> static const char * const recort_usage[] = {
> ^~~~~~~~~~~~
> I fixed the typo and realized we already export record_usage,
> so I also prefixed it with stat (and included report_usage).
Thanks, applied.
> Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
> Link: http://lkml.kernel.org/n/tip-3c3vkc6bejfsuxxgkcwxllsc@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/perf/builtin-stat.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 7f568244662b..038e877081b6 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1588,7 +1588,7 @@ static int add_default_attributes(void)
> return perf_evlist__add_default_attrs(evsel_list, very_very_detailed_attrs);
> }
>
> -static const char * const recort_usage[] = {
> +static const char * const stat_record_usage[] = {
> "perf stat record [<options>]",
> NULL,
> };
> @@ -1611,7 +1611,7 @@ static int __cmd_record(int argc, const char **argv)
> struct perf_session *session;
> struct perf_data_file *file = &perf_stat.file;
>
> - argc = parse_options(argc, argv, stat_options, record_usage,
> + argc = parse_options(argc, argv, stat_options, stat_record_usage,
> PARSE_OPT_STOP_AT_NON_OPTION);
>
> if (output_name)
> @@ -1745,7 +1745,7 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
> return set_maps(st);
> }
>
> -static const char * const report_usage[] = {
> +static const char * const stat_report_usage[] = {
> "perf stat report [<options>]",
> NULL,
> };
> @@ -1779,7 +1779,7 @@ static int __cmd_report(int argc, const char **argv)
> struct stat st;
> int ret;
>
> - argc = parse_options(argc, argv, options, report_usage, 0);
> + argc = parse_options(argc, argv, options, stat_report_usage, 0);
>
> if (!input_name || !strlen(input_name)) {
> if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode))
> --
> 2.4.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/urgent] perf stat: Fix recort_usage typo
2016-01-12 9:35 [PATCH] perf stat: Fix recort_usage typo Jiri Olsa
2016-01-12 14:15 ` Arnaldo Carvalho de Melo
@ 2016-01-13 9:39 ` tip-bot for Jiri Olsa
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jiri Olsa @ 2016-01-13 9:39 UTC (permalink / raw)
To: linux-tip-commits
Cc: markus, dsahern, namhyung, a.p.zijlstra, tglx, linux-kernel,
mingo, jolsa, hpa, acme
Commit-ID: 8a59f3ccbc11fcb222b046a64929dd473f7dff54
Gitweb: http://git.kernel.org/tip/8a59f3ccbc11fcb222b046a64929dd473f7dff54
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Tue, 12 Jan 2016 10:35:29 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 12 Jan 2016 11:13:52 -0300
perf stat: Fix recort_usage typo
Markus reported gcc 6 complains when compiling perf stat command:
builtin-stat.c:1591:27: error: ‘recort_usage’ defined but not used
[-Werror=unused-const-variable]
static const char * const recort_usage[] = {
^~~~~~~~~~~~
I fixed the typo and realized we already export record_usage, so I also
prefixed it with stat (and included report_usage).
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
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/r/1452591329-27620-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 7f56824..038e877 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1588,7 +1588,7 @@ static int add_default_attributes(void)
return perf_evlist__add_default_attrs(evsel_list, very_very_detailed_attrs);
}
-static const char * const recort_usage[] = {
+static const char * const stat_record_usage[] = {
"perf stat record [<options>]",
NULL,
};
@@ -1611,7 +1611,7 @@ static int __cmd_record(int argc, const char **argv)
struct perf_session *session;
struct perf_data_file *file = &perf_stat.file;
- argc = parse_options(argc, argv, stat_options, record_usage,
+ argc = parse_options(argc, argv, stat_options, stat_record_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
if (output_name)
@@ -1745,7 +1745,7 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
return set_maps(st);
}
-static const char * const report_usage[] = {
+static const char * const stat_report_usage[] = {
"perf stat report [<options>]",
NULL,
};
@@ -1779,7 +1779,7 @@ static int __cmd_report(int argc, const char **argv)
struct stat st;
int ret;
- argc = parse_options(argc, argv, options, report_usage, 0);
+ argc = parse_options(argc, argv, options, stat_report_usage, 0);
if (!input_name || !strlen(input_name)) {
if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode))
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-13 9:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 9:35 [PATCH] perf stat: Fix recort_usage typo Jiri Olsa
2016-01-12 14:15 ` Arnaldo Carvalho de Melo
2016-01-13 9:39 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
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.