From be77284226374c75583f36dbbf43203039f6a44c Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 1 Oct 2012 15:20:58 -0300 Subject: perf top: Don't use globals where not needed to Some variables were global but used in just one function, so move it to where it belongs. Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-3gddcwclncio29a7jiey0qtq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index e434a16bb5ac..f0c1c4f4692d 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1159,11 +1159,6 @@ setup: return 0; } -static const char * const top_usage[] = { - "perf top []", - NULL -}; - int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) { struct perf_evsel *pos; @@ -1250,6 +1245,10 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) OPT_STRING('u', "uid", &top.target.uid_str, "user", "user to profile"), OPT_END() }; + const char * const top_usage[] = { + "perf top []", + NULL + }; top.evlist = perf_evlist__new(NULL, NULL); if (top.evlist == NULL) -- cgit v1.2.3-59-g8ed1b