]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
perf script: add --addr2line option
authorMartin Liška <m.liska@foxlink.cz>
Fri, 19 Jul 2024 10:57:08 +0000 (12:57 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 12 Aug 2024 16:59:22 +0000 (13:59 -0300)
Similarly to other subcommands (like report, top), it would be handy to
provide a path for addr2line command.

Signed-off-by: Martin Liska <martin.liska@hey.com>
Cc: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/eadc3e36-029d-4848-9d69-272fe5a83a26@foxlink.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-script.txt
tools/perf/builtin-script.c
tools/perf/util/symbol_conf.h

index ff086ef05a0c506f1bfe08401361e6ef8ddd5866..5abb960c496091069085398998a3f22c6dafcf15 100644 (file)
@@ -369,6 +369,9 @@ OPTIONS
 --demangle-kernel::
        Demangle kernel symbol names to human readable form (for C++ kernels).
 
+--addr2line=<path>::
+       Path to addr2line binary.
+
 --header
        Show perf.data header.
 
index c16224b1fef3fdebfaa8b01fa95e143aeb7491ab..932167b2362b9c0c736980735a8407d10985af3c 100644 (file)
@@ -4052,6 +4052,8 @@ int cmd_script(int argc, const char **argv)
                        "Enable symbol demangling"),
        OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
                        "Enable kernel symbol demangling"),
+       OPT_STRING(0, "addr2line", &symbol_conf.addr2line_path, "path",
+                       "addr2line binary to use for line numbers"),
        OPT_STRING(0, "time", &script.time_str, "str",
                   "Time span of interest (start,stop)"),
        OPT_BOOLEAN(0, "inline", &symbol_conf.inline_name,
index 657cfa5af43cd3809c863a021d750cc761dd9bf3..a9c51acc722fed385c8d9ae1e80831f44754a17a 100644 (file)
@@ -64,7 +64,7 @@ struct symbol_conf {
                        *sym_list_str,
                        *col_width_list_str,
                        *bt_stop_list_str;
-       char            *addr2line_path;
+       const char              *addr2line_path;
        unsigned long   time_quantum;
        struct strlist  *dso_list,
                        *comm_list,