From: Jiri Olsa <jolsa@kernel.org> To: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: lkml <linux-kernel@vger.kernel.org>, David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Peter Zijlstra <a.p.zijlstra@chello.nl>, "Liang, Kan" <kan.liang@intel.com>, Don Zickus <dzickus@redhat.com> Subject: [PATCH 8/9] perf tools: Setup proper width for symbol_iaddr field Date: Mon, 5 Oct 2015 20:06:08 +0200 Message-ID: <1444068369-20978-9-git-send-email-jolsa@kernel.org> (raw) In-Reply-To: <1444068369-20978-1-git-send-email-jolsa@kernel.org> We need to properly initialize column width for symbol_iaddr field, so all symbols could fit in the column. Link: http://lkml.kernel.org/n/tip-hxo2kaxr49stt5ebukntrs3v@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/util/hist.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen); } + + if (h->mem_info->iaddr.sym) { + symlen = (int)h->mem_info->iaddr.sym->namelen + 4 + + unresolved_col_width + 2; + hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, + symlen); + } else { + symlen = unresolved_col_width + 4 + 2; + hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, + symlen); + } + if (h->mem_info->daddr.map) { symlen = dso__name_len(h->mem_info->daddr.map->dso); 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) } else { symlen = unresolved_col_width + 4 + 2; hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen); + hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, symlen); hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); } -- 2.4.3
next prev parent reply index Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-05 18:06 [PATCH 0/9] perf tools: Various fixes Jiri Olsa 2015-10-05 18:06 ` [PATCH 1/9] tools lib api fs: Do not use PATH_MAX + 1 Jiri Olsa 2015-10-06 7:12 ` [tip:perf/core] tools lib api fs: No need to " tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 2/9] perf evlist: Display DATA_SRC sample type bit Jiri Olsa 2015-10-06 7:13 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 3/9] perf annotate: Fix sizeof_sym_hist overflow issue Jiri Olsa 2015-10-06 7:13 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 4/9] perf tools: Make perf_event_attr__set_max_precise_ip global Jiri Olsa 2015-10-06 7:13 ` [tip:perf/core] perf tools: Export perf_event_attr__set_max_precise_ip() tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 5/9] perf tools: Introduce 'P' modifier Jiri Olsa 2015-10-05 18:13 ` David Ahern 2015-10-05 18:38 ` Jiri Olsa 2015-10-05 19:08 ` Arnaldo Carvalho de Melo 2015-10-05 19:20 ` Arnaldo Carvalho de Melo 2015-10-06 7:01 ` Jiri Olsa 2015-10-06 7:14 ` [tip:perf/core] perf tools: Introduce 'P' modifier to request max precision tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 6/9] perf tests: Add parsing test for 'P' modifier Jiri Olsa 2015-10-06 7:14 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 7/9] perf tools: Add support for sorting on the iaddr Jiri Olsa 2015-10-06 7:14 ` [tip:perf/core] " tip-bot for Don Zickus 2015-10-05 18:06 ` Jiri Olsa [this message] 2015-10-06 7:15 ` [tip:perf/core] perf tools: Setup proper width for symbol_iaddr field tip-bot for Jiri Olsa 2015-10-05 18:06 ` [PATCH 9/9] perf tools: Handle -h and -v options Jiri Olsa 2015-10-06 7:15 ` [tip:perf/core] " tip-bot for Jiri Olsa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1444068369-20978-9-git-send-email-jolsa@kernel.org \ --to=jolsa@kernel.org \ --cc=a.p.zijlstra@chello.nl \ --cc=acme@kernel.org \ --cc=dsahern@gmail.com \ --cc=dzickus@redhat.com \ --cc=kan.liang@intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@kernel.org \ --cc=namhyung@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git