diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-10-05 14:06:08 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-10-05 15:33:41 -0400 |
commit | b34b3bf0798633cc248b682f5b4f6509739ce234 (patch) | |
tree | b4cea9fa065dae73a5965fa7e364a2fb1160c71a | |
parent | 28e6db205b3ed3f1d86a00c69b3304190377da5f (diff) |
perf tools: Setup proper width for symbol_iaddr field
We need to properly initialize column width for symbol_iaddr field, so
all symbols could fit in the column.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1444068369-20978-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/hist.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index c346b331b892..4fd37d6708cb 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -132,6 +132,18 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) | |||
132 | hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, | 132 | hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, |
133 | symlen); | 133 | symlen); |
134 | } | 134 | } |
135 | |||
136 | if (h->mem_info->iaddr.sym) { | ||
137 | symlen = (int)h->mem_info->iaddr.sym->namelen + 4 | ||
138 | + unresolved_col_width + 2; | ||
139 | hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, | ||
140 | symlen); | ||
141 | } else { | ||
142 | symlen = unresolved_col_width + 4 + 2; | ||
143 | hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, | ||
144 | symlen); | ||
145 | } | ||
146 | |||
135 | if (h->mem_info->daddr.map) { | 147 | if (h->mem_info->daddr.map) { |
136 | symlen = dso__name_len(h->mem_info->daddr.map->dso); | 148 | symlen = dso__name_len(h->mem_info->daddr.map->dso); |
137 | hists__new_col_len(hists, HISTC_MEM_DADDR_DSO, | 149 | hists__new_col_len(hists, HISTC_MEM_DADDR_DSO, |
@@ -143,6 +155,7 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) | |||
143 | } else { | 155 | } else { |
144 | symlen = unresolved_col_width + 4 + 2; | 156 | symlen = unresolved_col_width + 4 + 2; |
145 | hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen); | 157 | hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen); |
158 | hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, symlen); | ||
146 | hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); | 159 | hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); |
147 | } | 160 | } |
148 | 161 | ||