diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 3976aebe3677..3e7f52054fac 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c @@ -14,6 +14,7 @@ #include #include #include "util/debug.h" +#include "util/util.h" #include #include #include diff --git a/tools/perf/builtin.h b/tools/perf/builtin.h index d03afea86217..f2ab5bae2150 100644 --- a/tools/perf/builtin.h +++ b/tools/perf/builtin.h @@ -2,9 +2,6 @@ #ifndef BUILTIN_H #define BUILTIN_H -extern const char perf_usage_string[]; -extern const char perf_more_info_string[]; - void list_common_cmds_help(void); const char *help_unknown_cmd(const char *cmd); diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 4b1b31e78332..997bb9ea5ebc 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -39,12 +39,6 @@ #include #include -const char perf_usage_string[] = - "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]"; - -const char perf_more_info_string[] = - "See 'perf help COMMAND' for more information on a specific command."; - static int use_pager = -1; const char *input_name; diff --git a/tools/perf/util/usage.c b/tools/perf/util/usage.c index 196438ee4c9d..4c8ffbad2323 100644 --- a/tools/perf/util/usage.c +++ b/tools/perf/util/usage.c @@ -12,6 +12,12 @@ #include #include +const char perf_usage_string[] = + "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]"; + +const char perf_more_info_string[] = + "See 'perf help COMMAND' for more information on a specific command."; + static __noreturn void usage_builtin(const char *err) { fprintf(stderr, "\n Usage: %s\n", err); diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 1d3b300af5a1..5010abf9e01e 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -15,6 +15,9 @@ #include #endif +extern const char perf_usage_string[]; +extern const char perf_more_info_string[]; + /* General helper functions */ void usage(const char *err) __noreturn; void die(const char *err, ...) __noreturn __printf(1, 2);