From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH 8/8] perf symbol: Don't demangle parameters and such by default
Date: Sat, 2 Aug 2014 10:35:03 -0300 [thread overview]
Message-ID: <20140802133503.GE13375@kernel.org> (raw)
In-Reply-To: <1406785662-5534-9-git-send-email-namhyung@kernel.org>
Em Thu, Jul 31, 2014 at 02:47:42PM +0900, Namhyung Kim escreveu:
> Some C++ symbols have very long name and they make column length
> longer. Most of them are about parameters including templates and we
> can ignore such info most of time IMHO.
>
> This patch passes DMGL_NO_OPTS by default when calling bfd_demangle().
> One can still see full symbols with -v/--verbose option.
>
> before:
> JS_CallFunctionValue(JSContext*, JSObject*, JS::Value, unsigned int, JS::Value*, JS::Value*)
>
> after:
> JS_CallFunctionValue
Are you sure we want that?
With this we'll end up having different instantiations having the same
name, since the way to differentiate them is exactly by a different
parameter list, no?
- Arnaldo
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/symbol-elf.c | 7 +++++--
> tools/perf/util/symbol.h | 1 +
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
> index d75349979e65..ec5ec1c9d9b5 100644
> --- a/tools/perf/util/symbol-elf.c
> +++ b/tools/perf/util/symbol-elf.c
> @@ -939,8 +939,11 @@ new_symbol:
> * to it...
> */
> if (symbol_conf.demangle) {
> - demangled = bfd_demangle(NULL, elf_name,
> - DMGL_PARAMS | DMGL_ANSI);
> + int demangle_flags = DMGL_NO_OPTS;
> + if (verbose)
> + demangle_flags = DMGL_PARAMS | DMGL_ANSI;
> +
> + demangled = bfd_demangle(NULL, elf_name, demangle_flags);
> if (demangled != NULL)
> elf_name = demangled;
> }
> diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
> index e7295e93cff9..c16dc16f83d5 100644
> --- a/tools/perf/util/symbol.h
> +++ b/tools/perf/util/symbol.h
> @@ -59,6 +59,7 @@ extern Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep,
> #endif
>
> #ifndef DMGL_PARAMS
> +#define DMGL_NO_OPTS 0 /* For readability... */
> #define DMGL_PARAMS (1 << 0) /* Include function args */
> #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
> #endif
> --
> 2.0.0
next prev parent reply other threads:[~2014-08-02 13:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 5:47 [PATCHSET 0/8] perf tools: Honor column width setting (v3) Namhyung Kim
2014-07-31 5:47 ` [PATCH 1/8] perf tools: Left-align output contents Namhyung Kim
2014-08-13 5:17 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 2/8] perf tools: Make __hpp__fmt() receive an additional len argument Namhyung Kim
2014-08-02 13:30 ` Arnaldo Carvalho de Melo
2014-08-11 8:05 ` Namhyung Kim
2014-08-11 13:17 ` Arnaldo Carvalho de Melo
2014-08-12 7:13 ` Namhyung Kim
2014-08-13 5:18 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 3/8] perf tools: Save column length in perf_hpp_fmt Namhyung Kim
2014-08-13 5:18 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 4/8] perf report: Honor column width setting Namhyung Kim
2014-08-13 5:18 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 5/8] perf top: Add -w option for setting column width Namhyung Kim
2014-08-13 5:18 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 6/8] perf tools: Add name field into perf_hpp_fmt Namhyung Kim
2014-08-13 5:19 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 7/8] perf tools: Fix column alignment when headers aren't shown on TUI Namhyung Kim
2014-08-13 5:19 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-07-31 5:47 ` [PATCH 8/8] perf symbol: Don't demangle parameters and such by default Namhyung Kim
2014-08-02 13:35 ` Arnaldo Carvalho de Melo [this message]
2014-08-11 8:17 ` Namhyung Kim
2014-08-11 13:32 ` Arnaldo Carvalho de Melo
2014-08-12 7:17 ` Namhyung Kim
2014-08-14 8:49 ` [tip:perf/core] perf symbols: Don' t " tip-bot for Namhyung Kim
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=20140802133503.GE13375@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome