Skip to content

Commit

Permalink
perf top: Don't use globals where not needed to
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Oct 2, 2012
1 parent 11c4e4a commit be77284
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,11 +1159,6 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit be77284

Please sign in to comment.