Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
Em Tue, Mar 30, 2021 at 08:19:10PM +0200, Martin Liška escreveu: > On 3/30/21 5:42 PM, Arnaldo Carvalho de Melo wrote: > > Trying to find V2 You said you would resend fixing up this: + OPT_BOOLEAN(0, "demangle", _conf.demangle, + "Disable symbol demangling"), ^^^ + OPT_BOOLEAN(0, "demangle-kernel", _conf.demangle_kernel, + "Enable kernel symbol demangling"), > It's this email: > https://lore.kernel.org/lkml/deb2af9e-25dd-ac72-29f4-ab90c2b24...@suse.cz/ > > Subject: Re: [PATCH] perf config: add annotate.demangle{,_kernel} > From: =?UTF-8?Q?Martin_Li=c5=a1ka?= > To: Arnaldo Carvalho de Melo > Cc: linux-kernel@vger.kernel.org, linux-perf-us...@vger.kernel.org > References: > > Message-ID: > Date: Fri, 26 Feb 2021 11:08:12 +0100 > > > Cheers, > Martin -- - Arnaldo
Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
On 3/30/21 5:42 PM, Arnaldo Carvalho de Melo wrote: Trying to find V2 It's this email: https://lore.kernel.org/lkml/deb2af9e-25dd-ac72-29f4-ab90c2b24...@suse.cz/ Subject: Re: [PATCH] perf config: add annotate.demangle{,_kernel} From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, linux-perf-us...@vger.kernel.org References: Message-ID: Date: Fri, 26 Feb 2021 11:08:12 +0100 Cheers, Martin
Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
Em Tue, Mar 30, 2021 at 09:41:33AM +0200, Martin Liška escreveu: > PING^2 > > On 3/7/21 8:23 PM, Martin Liška wrote: > > Hello. > > > > May I please remind this patch. Apparently, you applied the perf-config > > counterpart of the patch as 804fd30c6bd9aec7859a0503581312834fb197f1 > > (in tmp.perf/core branch), but we miss setting the same via options. > > > > Thank you, > > Martin > > > > On 2/26/21 11:01 AM, Martin Liška wrote: > > > On 2/23/21 8:49 PM, Arnaldo Carvalho de Melo wrote: > > > > Em Mon, Feb 22, 2021 at 09:29:22AM +0100, Martin Liška escreveu: > > > > > Perf annotate supports --symbol but it's impossible to filter > > > > > a C++ symbol. With --no-demangle one can filter easily by > > > > > mangled function name. > > > > > > > > > > Signed-off-by: Martin Liška > > > > > --- > > > > > tools/perf/Documentation/perf-annotate.txt | 7 +++ > > > > > tools/perf/builtin-annotate.c | 4 > > > > > 2 files changed, 11 insertions(+) > > > > > > > > > > diff --git a/tools/perf/Documentation/perf-annotate.txt > > > > > b/tools/perf/Documentation/perf-annotate.txt > > > > > index 1b5042f134a8..80c1be5d566c 100644 > > > > > --- a/tools/perf/Documentation/perf-annotate.txt > > > > > +++ b/tools/perf/Documentation/perf-annotate.txt > > > > > @@ -124,6 +124,13 @@ OPTIONS > > > > > --group:: > > > > > Show event group information together > > > > > +--demangle:: > > > > > + Demangle symbol names to human readable form. It's enabled by > > > > > default, > > > > > + disable with --no-demangle. > > > > > + > > > > > +--demangle-kernel:: > > > > > + Demangle kernel symbol names to human readable form (for C++ > > > > > kernels). > > > > > + > > > > > --percent-type:: > > > > > Set annotation percent type from following choices: > > > > > global-period, local-period, global-hits, local-hits > > > > > diff --git a/tools/perf/builtin-annotate.c > > > > > b/tools/perf/builtin-annotate.c > > > > > index a23ba6bb99b6..ef70a17b9b5b 100644 > > > > > --- a/tools/perf/builtin-annotate.c > > > > > +++ b/tools/perf/builtin-annotate.c > > > > > @@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) > > > > > "Strip first N entries of source file path name in > > > > > programs (with --prefix)"), > > > > > OPT_STRING(0, "objdump", _path, "path", > > > > > "objdump binary to use for disassembly and annotations"), > > > > > + OPT_BOOLEAN(0, "demangle", _conf.demangle, > > > > > + "Disable symbol demangling"), > > > > > > > > Nope, this _enables_ demangling, i.e.: > > > > > > > > perf annotate --demangle > > > > > > Oh, yeah, you are right. > > > > > > > > > > > Asks for symbol demangling, while: > > > > > > > > perf annotate --no-demangle > > > > > > > > As you correctly wrote in your commit message and on the > > > > --demangle-kernel case, enables demangling. > > > > > > Fixed that in V2. Trying to find V2 - Arnaldo
Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
PING^2 On 3/7/21 8:23 PM, Martin Liška wrote: Hello. May I please remind this patch. Apparently, you applied the perf-config counterpart of the patch as 804fd30c6bd9aec7859a0503581312834fb197f1 (in tmp.perf/core branch), but we miss setting the same via options. Thank you, Martin On 2/26/21 11:01 AM, Martin Liška wrote: On 2/23/21 8:49 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2021 at 09:29:22AM +0100, Martin Liška escreveu: Perf annotate supports --symbol but it's impossible to filter a C++ symbol. With --no-demangle one can filter easily by mangled function name. Signed-off-by: Martin Liška --- tools/perf/Documentation/perf-annotate.txt | 7 +++ tools/perf/builtin-annotate.c | 4 2 files changed, 11 insertions(+) diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt index 1b5042f134a8..80c1be5d566c 100644 --- a/tools/perf/Documentation/perf-annotate.txt +++ b/tools/perf/Documentation/perf-annotate.txt @@ -124,6 +124,13 @@ OPTIONS --group:: Show event group information together +--demangle:: + Demangle symbol names to human readable form. It's enabled by default, + disable with --no-demangle. + +--demangle-kernel:: + Demangle kernel symbol names to human readable form (for C++ kernels). + --percent-type:: Set annotation percent type from following choices: global-period, local-period, global-hits, local-hits diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index a23ba6bb99b6..ef70a17b9b5b 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) "Strip first N entries of source file path name in programs (with --prefix)"), OPT_STRING(0, "objdump", _path, "path", "objdump binary to use for disassembly and annotations"), + OPT_BOOLEAN(0, "demangle", _conf.demangle, + "Disable symbol demangling"), Nope, this _enables_ demangling, i.e.: perf annotate --demangle Oh, yeah, you are right. Asks for symbol demangling, while: perf annotate --no-demangle As you correctly wrote in your commit message and on the --demangle-kernel case, enables demangling. Fixed that in V2. Martin Please consider making this configurable (if not already) via ~/.perfconfig, 'perf config', sure in a followup patch. Thanks, - Arnaldo + OPT_BOOLEAN(0, "demangle-kernel", _conf.demangle_kernel, + "Enable kernel symbol demangling"), OPT_BOOLEAN(0, "group", _conf.event_group, "Show event group information together"), OPT_BOOLEAN(0, "show-total-period", _conf.show_total_period, -- 2.30.1
Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
Hello. May I please remind this patch. Apparently, you applied the perf-config counterpart of the patch as 804fd30c6bd9aec7859a0503581312834fb197f1 (in tmp.perf/core branch), but we miss setting the same via options. Thank you, Martin On 2/26/21 11:01 AM, Martin Liška wrote: On 2/23/21 8:49 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2021 at 09:29:22AM +0100, Martin Liška escreveu: Perf annotate supports --symbol but it's impossible to filter a C++ symbol. With --no-demangle one can filter easily by mangled function name. Signed-off-by: Martin Liška --- tools/perf/Documentation/perf-annotate.txt | 7 +++ tools/perf/builtin-annotate.c | 4 2 files changed, 11 insertions(+) diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt index 1b5042f134a8..80c1be5d566c 100644 --- a/tools/perf/Documentation/perf-annotate.txt +++ b/tools/perf/Documentation/perf-annotate.txt @@ -124,6 +124,13 @@ OPTIONS --group:: Show event group information together +--demangle:: + Demangle symbol names to human readable form. It's enabled by default, + disable with --no-demangle. + +--demangle-kernel:: + Demangle kernel symbol names to human readable form (for C++ kernels). + --percent-type:: Set annotation percent type from following choices: global-period, local-period, global-hits, local-hits diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index a23ba6bb99b6..ef70a17b9b5b 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) "Strip first N entries of source file path name in programs (with --prefix)"), OPT_STRING(0, "objdump", _path, "path", "objdump binary to use for disassembly and annotations"), + OPT_BOOLEAN(0, "demangle", _conf.demangle, + "Disable symbol demangling"), Nope, this _enables_ demangling, i.e.: perf annotate --demangle Oh, yeah, you are right. Asks for symbol demangling, while: perf annotate --no-demangle As you correctly wrote in your commit message and on the --demangle-kernel case, enables demangling. Fixed that in V2. Martin Please consider making this configurable (if not already) via ~/.perfconfig, 'perf config', sure in a followup patch. Thanks, - Arnaldo + OPT_BOOLEAN(0, "demangle-kernel", _conf.demangle_kernel, + "Enable kernel symbol demangling"), OPT_BOOLEAN(0, "group", _conf.event_group, "Show event group information together"), OPT_BOOLEAN(0, "show-total-period", _conf.show_total_period, -- 2.30.1
Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
On 2/23/21 8:49 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2021 at 09:29:22AM +0100, Martin Liška escreveu: Perf annotate supports --symbol but it's impossible to filter a C++ symbol. With --no-demangle one can filter easily by mangled function name. Signed-off-by: Martin Liška --- tools/perf/Documentation/perf-annotate.txt | 7 +++ tools/perf/builtin-annotate.c | 4 2 files changed, 11 insertions(+) diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt index 1b5042f134a8..80c1be5d566c 100644 --- a/tools/perf/Documentation/perf-annotate.txt +++ b/tools/perf/Documentation/perf-annotate.txt @@ -124,6 +124,13 @@ OPTIONS --group:: Show event group information together +--demangle:: + Demangle symbol names to human readable form. It's enabled by default, + disable with --no-demangle. + +--demangle-kernel:: + Demangle kernel symbol names to human readable form (for C++ kernels). + --percent-type:: Set annotation percent type from following choices: global-period, local-period, global-hits, local-hits diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index a23ba6bb99b6..ef70a17b9b5b 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) "Strip first N entries of source file path name in programs (with --prefix)"), OPT_STRING(0, "objdump", _path, "path", "objdump binary to use for disassembly and annotations"), + OPT_BOOLEAN(0, "demangle", _conf.demangle, + "Disable symbol demangling"), Nope, this _enables_ demangling, i.e.: perf annotate --demangle Oh, yeah, you are right. Asks for symbol demangling, while: perf annotate --no-demangle As you correctly wrote in your commit message and on the --demangle-kernel case, enables demangling. Fixed that in V2. Martin Please consider making this configurable (if not already) via ~/.perfconfig, 'perf config', sure in a followup patch. Thanks, - Arnaldo + OPT_BOOLEAN(0, "demangle-kernel", _conf.demangle_kernel, + "Enable kernel symbol demangling"), OPT_BOOLEAN(0, "group", _conf.event_group, "Show event group information together"), OPT_BOOLEAN(0, "show-total-period", _conf.show_total_period, -- 2.30.1 >From 336233abae5c539d7b2730cbbe35d0c7528bccc2 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 22 Feb 2021 09:24:22 +0100 Subject: [PATCH] perf annotate: add --demangle and --demangle-kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Perf annotate supports --symbol but it's impossible to filter a C++ symbol. With --no-demangle one can filter easily by mangled function name. Signed-off-by: Martin Liška --- tools/perf/Documentation/perf-annotate.txt | 7 +++ tools/perf/builtin-annotate.c | 4 2 files changed, 11 insertions(+) diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt index 1b5042f134a8..80c1be5d566c 100644 --- a/tools/perf/Documentation/perf-annotate.txt +++ b/tools/perf/Documentation/perf-annotate.txt @@ -124,6 +124,13 @@ OPTIONS --group:: Show event group information together +--demangle:: + Demangle symbol names to human readable form. It's enabled by default, + disable with --no-demangle. + +--demangle-kernel:: + Demangle kernel symbol names to human readable form (for C++ kernels). + --percent-type:: Set annotation percent type from following choices: global-period, local-period, global-hits, local-hits diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index a23ba6bb99b6..ea05d9f927cb 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) "Strip first N entries of source file path name in programs (with --prefix)"), OPT_STRING(0, "objdump", _path, "path", "objdump binary to use for disassembly and annotations"), + OPT_BOOLEAN(0, "demangle", _conf.demangle, + "Enable symbol demangling"), + OPT_BOOLEAN(0, "demangle-kernel", _conf.demangle_kernel, + "Enable kernel symbol demangling"), OPT_BOOLEAN(0, "group", _conf.event_group, "Show event group information together"), OPT_BOOLEAN(0, "show-total-period", _conf.show_total_period, -- 2.30.1
Re: [PATCH] perf annotate: add --demangle and --demangle-kernel
Em Mon, Feb 22, 2021 at 09:29:22AM +0100, Martin Liška escreveu: > Perf annotate supports --symbol but it's impossible to filter > a C++ symbol. With --no-demangle one can filter easily by > mangled function name. > > Signed-off-by: Martin Liška > --- > tools/perf/Documentation/perf-annotate.txt | 7 +++ > tools/perf/builtin-annotate.c | 4 > 2 files changed, 11 insertions(+) > > diff --git a/tools/perf/Documentation/perf-annotate.txt > b/tools/perf/Documentation/perf-annotate.txt > index 1b5042f134a8..80c1be5d566c 100644 > --- a/tools/perf/Documentation/perf-annotate.txt > +++ b/tools/perf/Documentation/perf-annotate.txt > @@ -124,6 +124,13 @@ OPTIONS > --group:: > Show event group information together > +--demangle:: > + Demangle symbol names to human readable form. It's enabled by default, > + disable with --no-demangle. > + > +--demangle-kernel:: > + Demangle kernel symbol names to human readable form (for C++ kernels). > + > --percent-type:: > Set annotation percent type from following choices: > global-period, local-period, global-hits, local-hits > diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c > index a23ba6bb99b6..ef70a17b9b5b 100644 > --- a/tools/perf/builtin-annotate.c > +++ b/tools/perf/builtin-annotate.c > @@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) > "Strip first N entries of source file path name in programs > (with --prefix)"), > OPT_STRING(0, "objdump", _path, "path", > "objdump binary to use for disassembly and annotations"), > + OPT_BOOLEAN(0, "demangle", _conf.demangle, > + "Disable symbol demangling"), Nope, this _enables_ demangling, i.e.: perf annotate --demangle Asks for symbol demangling, while: perf annotate --no-demangle As you correctly wrote in your commit message and on the --demangle-kernel case, enables demangling. Please consider making this configurable (if not already) via ~/.perfconfig, 'perf config', sure in a followup patch. Thanks, - Arnaldo > + OPT_BOOLEAN(0, "demangle-kernel", _conf.demangle_kernel, > + "Enable kernel symbol demangling"), > OPT_BOOLEAN(0, "group", _conf.event_group, > "Show event group information together"), > OPT_BOOLEAN(0, "show-total-period", _conf.show_total_period, > -- > 2.30.1 > -- - Arnaldo