summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-c2c.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2018-03-09 11:14:39 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-03-16 17:53:13 +0100
commitbc229c21f2c79ef0f7b30d3a2fce8c2886ffa6c7 (patch)
tree7935c29222e94db0d432589b138f548fcf05d094 /tools/perf/builtin-c2c.c
parentperf c2c report: Make calc_width work with struct c2c_hist_entry (diff)
downloadlinux-bc229c21f2c79ef0f7b30d3a2fce8c2886ffa6c7.tar.xz
linux-bc229c21f2c79ef0f7b30d3a2fce8c2886ffa6c7.zip
perf c2c report: Call calc_width() only for displayed entries
There's no need to calculate column widths for entries that are not going to be displayed. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Joe Mario <jmario@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20180309101442.9224-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r--tools/perf/builtin-c2c.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 43ce55550c9d..821112e8ba97 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -1873,12 +1873,11 @@ static int resort_cl_cb(struct hist_entry *he)
c2c_he = container_of(he, struct c2c_hist_entry, he);
c2c_hists = c2c_he->hists;
- calc_width(c2c_he);
-
if (display && c2c_hists) {
static unsigned int idx;
c2c_he->cacheline_idx = idx++;
+ calc_width(c2c_he);
c2c_hists__reinit(c2c_hists, c2c.cl_output, c2c.cl_resort);