Skip to content

Commit 8a59f3c

Browse files
olsajiriacmel
authored andcommitted
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>
1 parent 0bd106d commit 8a59f3c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tools/perf/builtin-stat.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ static int add_default_attributes(void)
15881588
return perf_evlist__add_default_attrs(evsel_list, very_very_detailed_attrs);
15891589
}
15901590

1591-
static const char * const recort_usage[] = {
1591+
static const char * const stat_record_usage[] = {
15921592
"perf stat record [<options>]",
15931593
NULL,
15941594
};
@@ -1611,7 +1611,7 @@ static int __cmd_record(int argc, const char **argv)
16111611
struct perf_session *session;
16121612
struct perf_data_file *file = &perf_stat.file;
16131613

1614-
argc = parse_options(argc, argv, stat_options, record_usage,
1614+
argc = parse_options(argc, argv, stat_options, stat_record_usage,
16151615
PARSE_OPT_STOP_AT_NON_OPTION);
16161616

16171617
if (output_name)
@@ -1745,7 +1745,7 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
17451745
return set_maps(st);
17461746
}
17471747

1748-
static const char * const report_usage[] = {
1748+
static const char * const stat_report_usage[] = {
17491749
"perf stat report [<options>]",
17501750
NULL,
17511751
};
@@ -1779,7 +1779,7 @@ static int __cmd_report(int argc, const char **argv)
17791779
struct stat st;
17801780
int ret;
17811781

1782-
argc = parse_options(argc, argv, options, report_usage, 0);
1782+
argc = parse_options(argc, argv, options, stat_report_usage, 0);
17831783

17841784
if (!input_name || !strlen(input_name)) {
17851785
if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode))

0 commit comments

Comments
 (0)