aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-10-09 15:16:00 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-10-14 16:32:52 -0400
commita635fc511e05774298153e3ddfef7c4cd51a1bb4 (patch)
tree1e6fc65518fb3dc6ebab1ab60663812b14caae5d /tools/perf/builtin-report.c
parent8f651eae186f4dfb1740988623c83ba03dcf3a76 (diff)
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/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 8043b5a7240a..2cfc4b93991f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -568,7 +568,6 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
568 struct stat st; 568 struct stat st;
569 bool has_br_stack = false; 569 bool has_br_stack = false;
570 int branch_mode = -1; 570 int branch_mode = -1;
571 int ret = -1;
572 char callchain_default_opt[] = "fractal,0.5,callee"; 571 char callchain_default_opt[] = "fractal,0.5,callee";
573 const char * const report_usage[] = { 572 const char * const report_usage[] = {
574 "perf report [<options>]", 573 "perf report [<options>]",
@@ -695,6 +694,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
695 struct perf_data_file file = { 694 struct perf_data_file file = {
696 .mode = PERF_DATA_MODE_READ, 695 .mode = PERF_DATA_MODE_READ,
697 }; 696 };
697 int ret = hists__init();
698
699 if (ret < 0)
700 return ret;
698 701
699 perf_config(report__config, &report); 702 perf_config(report__config, &report);
700 703