lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140802133503.GE13375@kernel.org>
Date:	Sat, 2 Aug 2014 10:35:03 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>, Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH 8/8] perf symbol: Don't demangle parameters and such by
 default

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@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ