Skip to content

Commit

Permalink
perf c2c report: Call calc_width() only for displayed entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Mar 16, 2018
1 parent 3773138 commit bc229c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/perf/builtin-c2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bc229c2

Please sign in to comment.