summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2015-09-09 17:14:00 +0200
committerArnaldo Carvalho de Melo2015-09-14 17:50:22 +0200
commita4978eca684a3b471f3da862f427e419283e93a3 (patch)
tree9b84f6077f6da9f8a644c0f62b4ff9b32a3854d1 /tools/perf/util/hist.c
parentperf env: Adopt perf_header__set_cmdline (diff)
downloadkernel-qcow2-linux-a4978eca684a3b471f3da862f427e419283e93a3.tar.gz
kernel-qcow2-linux-a4978eca684a3b471f3da862f427e419283e93a3.tar.xz
kernel-qcow2-linux-a4978eca684a3b471f3da862f427e419283e93a3.zip
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 <wangnan0@huawei.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-iqcdnkkqm6sew06x01fbijmy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c1
1 files changed, 1 insertions, 0 deletions
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);