]> git.baikalelectronics.ru Git - kernel.git/commit
perf hists: Update the column width for the "srcline" sort key
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 10 Aug 2015 19:53:54 +0000 (16:53 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 10 Aug 2015 20:19:59 +0000 (17:19 -0300)
commitf610e4cee6e1cd18f7d276eb104ff670ac98a25b
tree008c923aeea11295721f3e24b4fbcdf35a4b05e5
parent07ee5f1664823ee2e6dcf00b6cb7f14208a98b54
perf hists: Update the column width for the "srcline" sort key

When we introduce a new sort key, we need to update the
hists__calc_col_len() function accordingly, otherwise the width
will be limited to strlen(header).

We can't update it when obtaining a line value for a column (for
instance, in sort__srcline_cmp()), because we reset it all when doing a
resort (see hists__output_recalc_col_len()), so we need to, from what is
in the hist_entry fields, set each of the column widths.

Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Fixes: 875c25607820 ("perf tools: Add sort by src line/number")
Link: http://lkml.kernel.org/n/tip-jgbe0yx8v1gs89cslr93pvz2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/hist.c