perf session: Change perf_session post processing functions to take histogram tree
[pandora-kernel.git] / tools / perf / builtin-report.c
index cfc655d..294b4cf 100644 (file)
@@ -56,7 +56,8 @@ static int perf_session__add_hist_entry(struct perf_session *self,
        if ((sort__has_parent || symbol_conf.use_callchain) && chain)
                syms = perf_session__resolve_callchain(self, al->thread,
                                                       chain, &parent);
-       he = __perf_session__add_hist_entry(self, al, parent, count, &hit);
+       he = __perf_session__add_hist_entry(&self->hists, al, parent,
+                                           count, &hit);
        if (he == NULL)
                return -ENOMEM;
 
@@ -224,10 +225,12 @@ static int __cmd_report(void)
        if (verbose > 2)
                dsos__fprintf(stdout);
 
-       perf_session__collapse_resort(session);
-       perf_session__output_resort(session, session->events_stats.total);
+       perf_session__collapse_resort(&session->hists);
+       perf_session__output_resort(&session->hists,
+                                   session->events_stats.total);
        fprintf(stdout, "# Samples: %Ld\n#\n", session->events_stats.total);
-       perf_session__fprintf_hists(session, NULL, false, stdout);
+       perf_session__fprintf_hists(&session->hists, NULL, false, stdout,
+                                   session->events_stats.total);
        if (sort_order == default_sort_order &&
            parent_pattern == default_parent_pattern)
                fprintf(stdout, "#\n# (For a higher level overview, try: perf report --sort comm,dso)\n#\n");