From d599db3fc5dd4f1e8432fdbc6d899584b25f4dff Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 15 Dec 2009 20:04:42 -0200 Subject: perf report: Generalize perf_session__fprintf_hists() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pull it out of builtin-report - further changes will be made and it will then be reusable in 'perf diff' as well. Signed-off-by: Arnaldo Carvalho de Melo Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1260914682-29652-4-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar --- tools/perf/util/hist.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/perf/util/hist.c') diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index b9828fce7bf..d9a5a19391d 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -156,8 +156,7 @@ void perf_session__collapse_resort(struct perf_session *self) * reverse the map, sort on count. */ -static void perf_session__insert_output_hist_entry(struct perf_session *self, - struct rb_root *root, +static void perf_session__insert_output_hist_entry(struct rb_root *root, struct hist_entry *he, u64 min_callchain_hits) { @@ -165,7 +164,7 @@ static void perf_session__insert_output_hist_entry(struct perf_session *self, struct rb_node *parent = NULL; struct hist_entry *iter; - if (self->use_callchain) + if (symbol_conf.use_callchain) callchain_param.sort(&he->sorted_chain, &he->callchain, min_callchain_hits, &callchain_param); @@ -201,7 +200,7 @@ void perf_session__output_resort(struct perf_session *self, u64 total_samples) next = rb_next(&n->rb_node); rb_erase(&n->rb_node, &self->hists); - perf_session__insert_output_hist_entry(self, &tmp, n, + perf_session__insert_output_hist_entry(&tmp, n, min_callchain_hits); } -- cgit v1.2.3