From: Arnaldo Carvalho de Melo Date: Wed, 9 Sep 2015 15:14:00 +0000 (-0300) Subject: perf hists browser: Fixup the "cpu" column width calculation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a4978eca684a3b471f3da862f427e419283e93a3;p=linux-beck.git perf hists browser: Fixup the "cpu" column width calculation Since we were not setting it to at least 3 chars ('CPU'), it was being reset to zero when recalculating the columns width when refreshing the screen, in 'perf top'. Fix it. Tested-by: Wang Nan Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-iqcdnkkqm6sew06x01fbijmy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 08b6cd945f1e..48d5906a3f9f 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -144,6 +144,7 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); } + hists__new_col_len(hists, HISTC_CPU, 3); hists__new_col_len(hists, HISTC_MEM_LOCKED, 6); hists__new_col_len(hists, HISTC_MEM_TLB, 22); hists__new_col_len(hists, HISTC_MEM_SNOOP, 12);