perf tools: Remove hists from evsel
[cascardo/linux.git] / tools / perf / builtin-report.c
index 8043b5a..2cfc4b9 100644 (file)
@@ -568,7 +568,6 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
        struct stat st;
        bool has_br_stack = false;
        int branch_mode = -1;
-       int ret = -1;
        char callchain_default_opt[] = "fractal,0.5,callee";
        const char * const report_usage[] = {
                "perf report [<options>]",
@@ -695,6 +694,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
        struct perf_data_file file = {
                .mode  = PERF_DATA_MODE_READ,
        };
+       int ret = hists__init();
+
+       if (ret < 0)
+               return ret;
 
        perf_config(report__config, &report);