[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398327843-31845-4-git-send-email-namhyung@kernel.org>
Date: Thu, 24 Apr 2014 17:23:55 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Namhyung Kim <namhyung.kim@....com>,
Namhyung Kim <namhyung@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
David Ahern <dsahern@...il.com>,
Andi Kleen <andi@...stfloor.org>
Subject: [PATCH 03/11] perf hists: Move column length calculation out of hists__inc_stats()
It's not the part of logic of hists__inc_stats() so it'd be better to
move it out of the function.
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/builtin-diff.c | 3 +++
tools/perf/util/hist.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 0e46fa1b5ca0..c9cc771f182a 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -587,6 +587,9 @@ static void hists__compute_resort(struct hists *hists)
insert_hist_entry_by_compute(&hists->entries, he, compute);
hists__inc_stats(hists, he);
+
+ if (!he->filtered)
+ hists__calc_col_len(hists, he);
}
}
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 12d6c1bd761d..f5b388e50265 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -320,7 +320,6 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)
void hists__inc_stats(struct hists *hists, struct hist_entry *h)
{
if (!h->filtered) {
- hists__calc_col_len(hists, h);
hists->nr_non_filtered_entries++;
hists->stats.total_non_filtered_period += h->stat.period;
}
@@ -687,6 +686,9 @@ void hists__output_resort(struct hists *hists)
__hists__insert_output_entry(&hists->entries, n, min_callchain_hits);
hists__inc_stats(hists, n);
+
+ if (!n->filtered)
+ hists__calc_col_len(hists, n);
}
}
--
1.9.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists