[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2349b3e-b3e2-f979-6bc5-a2cffbdd2d6a@suse.cz>
Date: Fri, 26 Feb 2021 11:01:11 +0100
From: Martin Liška <mliska@...e.cz>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: 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 <mliska@...e.cz>
>> ---
>> 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", &annotate.opts.objdump_path, "path",
>> "objdump binary to use for disassembly and annotations"),
>> + OPT_BOOLEAN(0, "demangle", &symbol_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", &symbol_conf.demangle_kernel,
>> + "Enable kernel symbol demangling"),
>> OPT_BOOLEAN(0, "group", &symbol_conf.event_group,
>> "Show event group information together"),
>> OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period,
>> --
>> 2.30.1
>>
>
View attachment "0001-perf-annotate-add-demangle-and-demangle-kernel.patch" of type "text/x-patch" (2159 bytes)
Powered by blists - more mailing lists