perf hists browser: Fixup the "cpu" column width calculation
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: a4978eca684a3b471f3da862f427e419283e93a3 Gitweb: http://git.kernel.org/tip/a4978eca684a3b471f3da862f427e419283e93a3 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 9 Sep 2015 12:14:00 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 14 Sep 2015 12:50:22 -0300
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 <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Stephane Eranian <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/hist.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/hist.c +1 -0
@@ -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 );