diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-01 15:20:58 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-02 18:36:38 -0300 |
commit | be77284226374c75583f36dbbf43203039f6a44c (patch) | |
tree | 5bbb979df2c1d3711e228ba00463bee03bb65686 /tools | |
parent | 11c4e4a32b420db683cf58069c525e94797ce044 (diff) | |
download | linux-be77284226374c75583f36dbbf43203039f6a44c.tar.gz linux-be77284226374c75583f36dbbf43203039f6a44c.tar.bz2 linux-be77284226374c75583f36dbbf43203039f6a44c.zip |
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 <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-3gddcwclncio29a7jiey0qtq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-top.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 [<options>]", - 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 [<options>]", + NULL + }; top.evlist = perf_evlist__new(NULL, NULL); if (top.evlist == NULL) |