diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-09 21:16:00 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-14 22:32:52 +0200 |
commit | a635fc511e05774298153e3ddfef7c4cd51a1bb4 (patch) | |
tree | 1e6fc65518fb3dc6ebab1ab60663812b14caae5d /tools/perf/tests/builtin-test.c | |
parent | perf callchain: Move the callchain_param extern to callchain.h (diff) | |
download | linux-a635fc511e05774298153e3ddfef7c4cd51a1bb4.tar.xz linux-a635fc511e05774298153e3ddfef7c4cd51a1bb4.zip |
perf tools: Remove hists from evsel
Now tools that deals want to have an hists per evsel need to call
hists__init() before creating any evsels, which can be as early as when
parsing the command line, so do it before calling parse_options().
The current tools using hists/hist_entries are report, top and annotate,
change them to request per evsel hists.
This is in preparation for making evsels usable by 3rd party tools, that
not necessarily live in perf's source code repository.
Acked-by: Borislav Petkov <bp@suse.de>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
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-usjx2la743f10ippj7p1b20x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index ac655b0700e7..162c978f1491 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -6,6 +6,7 @@ #include <unistd.h> #include <string.h> #include "builtin.h" +#include "hist.h" #include "intlist.h" #include "tests.h" #include "debug.h" @@ -302,6 +303,10 @@ int cmd_test(int argc, const char **argv, const char *prefix __maybe_unused) OPT_END() }; struct intlist *skiplist = NULL; + int ret = hists__init(); + + if (ret < 0) + return ret; argc = parse_options(argc, argv, test_options, test_usage, 0); if (argc >= 1 && !strcmp(argv[0], "list")) |