perf addr2line: Rework disable_add2line_warn
Subsystems (2)
v2 cover perf addr2line: Rework disable_add2line_warn
Introduce configurable addr2line_disable_warn entry in the .perfconfig file. Clean up addr2line configuration.
V1 --> V2: Update perf-config documentation.
Patch 1:
Rename disable_add2line_warn to addr2line_disable_warn (with 'r') and start name with prefix addr2line_ to make it consistent with other addr2line_xxx configuration parameters.
Patch 2:
Enable symbol_conf::addr2line_disable_warn set via config file.
Patch 3:
Remove global variable addr2line_timeout_ms and make it a member of struct::symbol_conf. Update perf-config documentation.
Thomas Richter (3):
perf config: Rename symbol_conf::disable_add2line_warn perf config: Make symbol_conf::addr2line_disable_warn configurable perf addr2line: Remove global variable addr2line_timeout_ms
tools/perf/Documentation/perf-config.txt | 6 ++++++ tools/perf/builtin-diff.c | 4 ++-- tools/perf/util/addr2line.c | 20 ++++++++++---------- tools/perf/util/addr2line.h | 2 -- tools/perf/util/block-info.c | 2 +- tools/perf/util/config.c | 6 ++++-- tools/perf/util/libbfd.c | 2 +- tools/perf/util/symbol_conf.h | 3 ++- 8 files changed, 26 insertions(+), 19 deletions(-)
Signature · 1 line
2.53.0
PATCH v2 1/3 perf config: Rename symbol_conf::disable_add2line_warn
Rename member symbol_conf::disable_add2line_warn to symbol_conf::addr2line_disable_warn to make it consistent with other addr2line_xxx constants.
No functional change.
--- tools/perf/builtin-diff.c | 4 ++-- tools/perf/util/addr2line.c | 12 ++++++------ tools/perf/util/block-info.c | 2 +- tools/perf/util/libbfd.c | 2 +- tools/perf/util/symbol_conf.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-)
tools/perf/builtin-diff.c +2 -2
@@ -1352,7 +1352,7 @@ static int cycles_printf(struct hist_entry *he, struct hist_entry *pair,/* * Avoid printing the warning "addr2line_init failed for ..." */ - symbol_conf.disable_add2line_warn = true; + symbol_conf.addr2line_disable_warn = true; bi = block_he->block_info;
@@ -1986,7 +1986,7 @@ int cmd_diff(int argc, const char **argv)if (compute ==COMPUTE_STREAM ) { symbol_conf.show_branchflag_count = true; - symbol_conf.disable_add2line_warn = true; + symbol_conf.addr2line_disable_warn = true; callchain_param.mode =CHAIN_FLAT ; callchain_param.key =CCKEY_SRCLINE ; callchain_param.branch_callstack =1 ;
tools/perf/util/addr2line.c +6 -6
@@ -123,7 +123,7 @@ static enum cmd_a2l_style cmd_addr2line_configure(struct child_process *a2l, con lines =3 ;pr_debug3 ("Detected binutils addr2line style\n" ); }else { -if (!symbol_conf.disable_add2line_warn) { +if (!symbol_conf.addr2line_disable_warn) {char *output =NULL ;size_t output_len;
@@ -310,7 +310,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, }if (a2l ==NULL ) { -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: addr2line_subprocess_init failed\n" , __func__, dso_name); goto out; }
@@ -330,7 +330,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, len =snprintf (buf,sizeof (buf),"%016" PRIx64"\n,\n" , addr); written = len >0 ?write (a2l->in, buf, len) :-1 ;if (written != len) { -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: could not send request\n" , __func__, dso_name); goto out; }
@@ -339,7 +339,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,switch (read_addr2line_record (&io, cmd_a2l_style, dso_name, addr,/*first=*/ true, &record_function, &record_filename, &record_line_nr)) {case -1 : -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: could not read first record\n" , __func__, dso_name); goto out;case 0 :
@@ -355,7 +355,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, /*addr=*/1, /*first=*/true, NULL, NULL, NULL)) {case -1 : -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: could not read sentinel record\n" , __func__, dso_name);break ;
@@ -363,7 +363,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,/* The sentinel as expected. */ break ;default : -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: unexpected record instead of sentinel" , __func__, dso_name);break ;
tools/perf/util/block-info.c +1 -1
@@ -303,7 +303,7 @@ static int block_range_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,char buf[128 ];char *start_line, *end_line; - symbol_conf.disable_add2line_warn = true; + symbol_conf.addr2line_disable_warn = true; start_line =map__srcline (he->ms.map, bi->sym->start + bi->start, he->ms.sym);
tools/perf/util/libbfd.c +1 -1
@@ -233,7 +233,7 @@ int libbfd__addr2line(const char *dso_name, u64 addr, }if (a2l ==NULL ) { -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("addr2line_init failed for %s\n" , dso_name);return 0 ; }
tools/perf/util/symbol_conf.h +1 -1
@@ -51,7 +51,7 @@ struct symbol_conf { report_block, report_individual_block, inline_name, - disable_add2line_warn, + addr2line_disable_warn, no_buildid_mmap2, guest_code, lazy_load_kernel_maps,
Signature · 1 line
2.53.0
Namhyung Kim
maintainerRe: [PATCH v2 1/3] perf config: Rename symbol_conf::disable_add2line_warn
Quoted 6 lines · Thomas Richter
Rename member
symbol_conf::disable_add2line_warntosymbol_conf::addr2line_disable_warnto make it consistent with otheraddr2line_xxxconstants.
No functional change.Fixes 257046a36750a ("perf srcline: Fallback between addr2line implementations")
I'm not sure if we want it for typo fixes.
Thanks,
Namhyung
Quoted 133 lines
Cc Ian Rogers <[email protected]>Signed-off-by Thomas Richter <[email protected]>Reviewed-by Ian Rogers <[email protected]>--- tools/perf/builtin-diff.c | 4 ++-- tools/perf/util/addr2line.c | 12 ++++++------ tools/perf/util/block-info.c | 2 +- tools/perf/util/libbfd.c | 2 +- tools/perf/util/symbol_conf.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-)tools/perf/builtin-diff.c +2
-2@@ -1352,7 +1352,7 @@ static int cycles_printf(struct hist_entry *he, struct hist_entry *pair,/* * Avoid printing the warning "addr2line_init failed for ..." */ - symbol_conf.disable_add2line_warn = true; + symbol_conf.addr2line_disable_warn = true; bi = block_he->block_info;@@ -1986,7 +1986,7 @@ int cmd_diff(int argc, const char **argv)if (compute ==COMPUTE_STREAM ) { symbol_conf.show_branchflag_count = true; - symbol_conf.disable_add2line_warn = true; + symbol_conf.addr2line_disable_warn = true; callchain_param.mode =CHAIN_FLAT ; callchain_param.key =CCKEY_SRCLINE ; callchain_param.branch_callstack =1 ;tools/perf/util/addr2line.c +6
-6@@ -123,7 +123,7 @@ static enum cmd_a2l_style cmd_addr2line_configure(struct child_process *a2l, con lines =3 ;pr_debug3 ("Detected binutils addr2line style\n" ); }else { -if (!symbol_conf.disable_add2line_warn) { +if (!symbol_conf.addr2line_disable_warn) {char *output =NULL ;size_t output_len;@@ -310,7 +310,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, }if (a2l ==NULL ) { -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: addr2line_subprocess_init failed\n" , __func__, dso_name); goto out; }@@ -330,7 +330,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, len =snprintf (buf,sizeof (buf),"%016" PRIx64"\n,\n" , addr); written = len >0 ?write (a2l->in, buf, len) :-1 ;if (written != len) { -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: could not send request\n" , __func__, dso_name); goto out; }@@ -339,7 +339,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,switch (read_addr2line_record (&io, cmd_a2l_style, dso_name, addr,/*first=*/ true, &record_function, &record_filename, &record_line_nr)) {case -1 : -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: could not read first record\n" , __func__, dso_name); goto out;case 0 :@@ -355,7 +355,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, /*addr=*/1, /*first=*/true, NULL, NULL, NULL)) {case -1 : -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: could not read sentinel record\n" , __func__, dso_name);break ;@@ -363,7 +363,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,/* The sentinel as expected. */ break ;default : -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("%s %s: unexpected record instead of sentinel" , __func__, dso_name);break ;tools/perf/util/block-info.c +1
-1@@ -303,7 +303,7 @@ static int block_range_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,char buf[128 ];char *start_line, *end_line; - symbol_conf.disable_add2line_warn = true; + symbol_conf.addr2line_disable_warn = true; start_line =map__srcline (he->ms.map, bi->sym->start + bi->start, he->ms.sym);tools/perf/util/libbfd.c +1
-1@@ -233,7 +233,7 @@ int libbfd__addr2line(const char *dso_name, u64 addr, }if (a2l ==NULL ) { -if (!symbol_conf.disable_add2line_warn) +if (!symbol_conf.addr2line_disable_warn)pr_warning ("addr2line_init failed for %s\n" , dso_name);return 0 ; }tools/perf/util/symbol_conf.h +1
-1@@ -51,7 +51,7 @@ struct symbol_conf { report_block, report_individual_block, inline_name, - disable_add2line_warn, + addr2line_disable_warn, no_buildid_mmap2, guest_code, lazy_load_kernel_maps,Signature · 1 line
2.53.0
Re: [PATCH v2 1/3] perf config: Rename symbol_conf::disable_add2line_warn
Quoted 6 lines · Namhyung Kim
Quoted 5 lines · Thomas Richter
Rename member
symbol_conf::disable_add2line_warntosymbol_conf::addr2line_disable_warnto make it consistent with otheraddr2line_xxxconstants.
No functional change.
Quoted 8 lines
Quoted 1 line
Fixes 257046a36750a ("perf srcline: Fallback between addr2line implementations")I'm not sure if we want it for typo fixes.
Thanks,
Namhyung
...snip...
Do you want me to drop the Fixes: line or the complete rename patch?
Signature · 9 lines
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany -- IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Wolfgang Wendt Geschäftsführung: David Faller Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
Namhyung Kim
maintainerRe: [PATCH v2 1/3] perf config: Rename symbol_conf::disable_add2line_warn
Quoted 11 lines · Thomas Richter
Quoted 10 lines · Namhyung Kim
Quoted 6 lines · Thomas Richter
Rename member
symbol_conf::disable_add2line_warntosymbol_conf::addr2line_disable_warnto make it consistent with otheraddr2line_xxxconstants.
No functional change.Fixes 257046a36750a ("perf srcline: Fallback between addr2line implementations")I'm not sure if we want it for typo fixes.
Quoted 8 lines
Quoted 4 lines
Thanks,
Namhyung...snip...
Do you want me to drop the Fixes: line or the complete rename patch?
Oh.. I meant the Fixes: line.
Thanks,
Namhyung
PATCH v2 2/3 perf config: Make symbol_conf::addr2line_disable_warn configurable
In reply to Thomas RichterMake symbol_conf::addr2line_disable_warn configurable by reading the perfconfig file. Use section core and addr2line-disable-warn = value.
Example:
# perf config -l core.addr2line-timeout=500 core.addr2line-disable-warn=1 #
--- tools/perf/util/config.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/config.c +3 -0
@@ -461,6 +461,9 @@ static int perf_default_core_config(const char *var, const char *value)if (!strcmp (var,"core.addr2line-timeout" )) addr2line_timeout_ms =strtoul (value,NULL ,10 ); +if (!strcmp (var,"core.addr2line-disable-warn" )) + symbol_conf.addr2line_disable_warn =strtoul (value,NULL ,10 ); +/* Add other config variables here. */ return 0 ; }
Signature · 1 line
2.53.0
Namhyung Kim
maintainerRe: [PATCH v2 2/3] perf config: Make symbol_conf::addr2line_disable_warn configurable
Quoted 3 lines · Thomas Richter
Make
symbol_conf::addr2line_disable_warnconfigurable by reading the perfconfig file. Use section core and addr2line-disable-warn = value.
I think it's better to have it under "report" or something. But it seems we already have one in the "core" section.
Quoted 7 lines
Example:
# perf config -l core.addr2line-timeout=500 core.addr2line-disable-warn=1 #
Quoted 6 lines
Signed-off-by Thomas Richter <[email protected]>Reviewed-by Ian Rogers <[email protected]>Cc Ian Rogers <[email protected]>--- tools/perf/util/config.c | 3 +++ 1 file changed, 3 insertions(+)
It'd be great if you add documentation in the same change.
tools/perf/util/config.c static int perf_default_core_config(const char *var, const char *value) · line 465
Quoted 11 lines
tools/perf/util/config.c +2
-0@@ -461,6 +461,9 @@ static int perf_default_core_config(const char *var, const char *value)if (!strcmp (var,"core.addr2line-timeout" )) addr2line_timeout_ms =strtoul (value,NULL ,10 ); +if (!strcmp (var,"core.addr2line-disable-warn" )) + symbol_conf.addr2line_disable_warn =strtoul (value,NULL ,10 );
As it's boolean, better to use perf_config_bool() instead of strtoul() so that it can accept "true" or "yes" as well as numbers.
Thanks,
Namhyung
Quoted 7 lines
tools/perf/util/config.c +1
-0+/* Add other config variables here. */ return 0 ; }Signature · 1 line
2.53.0
Re: [PATCH v2 2/3] perf config: Make symbol_conf::addr2line_disable_warn configurable
Quoted 8 lines · Namhyung Kim
Quoted 3 lines · Thomas Richter
Make
symbol_conf::addr2line_disable_warnconfigurable by reading the perfconfig file. Use section core and addr2line-disable-warn = value.I think it's better to have it under "report" or something. But it seems we already have one in the "core" section.
...snip...
It was added to the core section of the perf-config file by this patch:
commit 701677b95764 ("perf srcline: Add a timeout to reading from addr2line")
submitted by Ian Rogers in 2023. That is the reason why I left it in this section for backward compatability.
We could also move it to the annotate::* section. What do you prefer?
I will add the other remarks in the new patch v3.
Signature · 9 lines
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany -- IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Wolfgang Wendt Geschäftsführung: David Faller Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
Namhyung Kim
maintainerRe: [PATCH v2 2/3] perf config: Make symbol_conf::addr2line_disable_warn configurable
Quoted 12 lines · Thomas Richter
Quoted 8 lines · Namhyung Kim
Quoted 3 lines · Thomas Richter
Make
symbol_conf::addr2line_disable_warnconfigurable by reading the perfconfig file. Use section core and addr2line-disable-warn = value.I think it's better to have it under "report" or something. But it seems we already have one in the "core" section.
...snip...
Quoted 8 lines
It was added to the core section of the perf-config file by this patch:
commit
701677b95764("perf srcline: Add a timeout to reading from addr2line")submitted by Ian Rogers in 2023. That is the reason why I left it in this section for backward compatability.
We could also move it to the annotate::* section. What do you prefer?
I think we should keep it under "core" to be compatible.
Thanks,
Namhyung
Quoted 12 lines
I will add the other remarks in the new patch v3.
Signature · 9 lines
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany -- IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Wolfgang Wendt Geschäftsführung: David Faller Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
PATCH v2 3/3 perf addr2line: Remove global variable addr2line_timeout_ms
In reply to Thomas RichterRemove global variable addr2line_timeout_ms and add is as member to symbol_conf structure. Update the documentation for perf config file.
--- tools/perf/Documentation/perf-config.txt | 6 ++++++ tools/perf/util/addr2line.c | 8 ++++---- tools/perf/util/addr2line.h | 2 -- tools/perf/util/config.c | 3 +-- tools/perf/util/symbol_conf.h | 1 + 5 files changed, 12 insertions(+), 8 deletions(-)
tools/perf/Documentation/perf-config.txt +6 -0
@@ -206,6 +206,12 @@ colors.*:: Default values are 'white', 'blue'. core.*:: + addr2line-disable-warn:: + When set to 1 disable all warnings from 'addr2line' output. + Default setting is 0 to show these warnings. + addr2line-timeout:: + Sets a timeout (in milliseconds) for parsing 'addr2line' + output. The default timeout is 500ms. core.proc-map-timeout:: Sets a timeout (in milliseconds) for parsing /proc/<pid>/maps files. Can be overridden by the --proc-map-timeout option on supported
tools/perf/util/addr2line.c +4 -4
@@ -18,9 +18,6 @@#define MAX_INLINE_NEST 1024 -/* If addr2line doesn't return data for 5 seconds then timeout. */ -int addr2line_timeout_ms =5 *1000 ; -static int filename_split (char *filename,unsigned int *line_nr) {char *sep;
@@ -87,6 +84,9 @@ static struct child_process *addr2line_subprocess_init(const char *addr2line_patreturn NULL ; } +if (!symbol_conf.addr2line_timeout_ms) + symbol_conf.addr2line_timeout_ms =5 *1000 ; +return a2l; }
@@ -335,7 +335,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, goto out; }io__init (&io, a2l->out, buf,sizeof (buf)); - io.timeout_ms = addr2line_timeout_ms; + io.timeout_ms = symbol_conf.addr2line_timeout_ms;switch (read_addr2line_record (&io, cmd_a2l_style, dso_name, addr,/*first=*/ true, &record_function, &record_filename, &record_line_nr)) {case -1 :
tools/perf/util/addr2line.h +0 -2
@@ -8,8 +8,6 @@ struct dso;struct inline_node ;struct symbol ; -extern int addr2line_timeout_ms; - int cmd__addr2line(const char *dso_name, u64 addr, char **file, unsigned int *line_nr, struct dso *dso,
tools/perf/util/config.c +1 -2
@@ -19,7 +19,6 @@#include "util/hist.h" /* perf_hist_config */ #include "util/stat.h" /* perf_stat__set_big_num */ #include "util/evsel.h" /* evsel__hw_names, evsel__use_bpf_counters */ -#include "util/addr2line.h" /* addr2line_timeout_ms */ #include "srcline.h" #include "build-id.h" #include "debug.h"
@@ -459,7 +458,7 @@ static int perf_default_core_config(const char *var, const char *value) proc_map_timeout =strtoul (value,NULL ,10 );if (!strcmp (var,"core.addr2line-timeout" )) - addr2line_timeout_ms =strtoul (value,NULL ,10 ); + symbol_conf.addr2line_timeout_ms =strtoul (value,NULL ,10 );if (!strcmp (var,"core.addr2line-disable-warn" )) symbol_conf.addr2line_disable_warn =strtoul (value,NULL ,10 );
tools/perf/util/symbol_conf.h +1 -0
@@ -80,6 +80,7 @@ struct symbol_conf { *bt_stop_list_str;const char *addr2line_path;enum a2l_style addr2line_style[MAX_A2L_STYLE ]; +int addr2line_timeout_ms;unsigned long time_quantum;struct strlist *dso_list, *comm_list,
Signature · 1 line
2.53.0
Namhyung Kim
maintainerRe: [PATCH v2 3/3] perf addr2line: Remove global variable addr2line_timeout_ms
Quoted 5 lines · Thomas Richter
Remove global variable
addr2line_timeout_msand add is as member tosymbol_confstructure. Update the documentation for perf config file.Fixes 257046a36750a ("perf srcline: Fallback between addr2line implementations")
I don't think this fixes anything.
Quoted 16 lines
Signed-off-by Thomas Richter <[email protected]>Reviewed-by Ian Rogers <[email protected]>Cc Ian Rogers <[email protected]>--- tools/perf/Documentation/perf-config.txt | 6 ++++++ tools/perf/util/addr2line.c | 8 ++++---- tools/perf/util/addr2line.h | 2 -- tools/perf/util/config.c | 3 +-- tools/perf/util/symbol_conf.h | 1 + 5 files changed, 12 insertions(+), 8 deletions(-)tools/perf/Documentation/perf-config.txt +0
-0
tools/perf/Documentation/perf-config.txt colors.*:: · line 214
Quoted 9 lines
tools/perf/Documentation/perf-config.txt +6
-0@@ -206,6 +206,12 @@ colors.*:: Default values are 'white', 'blue'. core.*:: + addr2line-disable-warn:: + When set to 1 disable all warnings from 'addr2line' output. + Default setting is 0 to show these warnings. + addr2line-timeout:: + Sets a timeout (in milliseconds) for parsing 'addr2line' + output. The default timeout is 500ms.
It should be 5000ms or 5s.
Quoted 18 lines
tools/perf/Documentation/perf-config.txt +0
-0core.proc-map-timeout:: Sets a timeout (in milliseconds) for parsing /proc/<pid>/maps files. Can be overridden by the --proc-map-timeout option on supportedtools/perf/util/addr2line.c +0
-3@@ -18,9 +18,6 @@#define MAX_INLINE_NEST 1024 -/* If addr2line doesn't return data for 5 seconds then timeout. */ -int addr2line_timeout_ms =5 *1000 ; -static int filename_split (char *filename,unsigned int *line_nr) {char *sep;
tools/perf/util/addr2line.c static struct child_process *addr2line_subprocess_init(const char *addr2line_pat · line 88
Quoted 5 lines
tools/perf/util/addr2line.c +2
-0@@ -87,6 +84,9 @@ static struct child_process *addr2line_subprocess_init(const char *addr2line_patreturn NULL ; } +if (!symbol_conf.addr2line_timeout_ms) + symbol_conf.addr2line_timeout_ms =5 *1000 ;
As I said before, you can put it in the util/symbol.c.
Thanks,
Namhyung
Quoted 62 lines
tools/perf/util/addr2line.c +2
-1+return a2l; }@@ -335,7 +335,7 @@ int cmd__addr2line(const char *dso_name, u64 addr, goto out; }io__init (&io, a2l->out, buf,sizeof (buf)); - io.timeout_ms = addr2line_timeout_ms; + io.timeout_ms = symbol_conf.addr2line_timeout_ms;switch (read_addr2line_record (&io, cmd_a2l_style, dso_name, addr,/*first=*/ true, &record_function, &record_filename, &record_line_nr)) {case -1 :tools/perf/util/addr2line.h +0
-2@@ -8,8 +8,6 @@ struct dso;struct inline_node ;struct symbol ; -extern int addr2line_timeout_ms; - int cmd__addr2line(const char *dso_name, u64 addr, char **file, unsigned int *line_nr, struct dso *dso,tools/perf/util/config.c +1
-2@@ -19,7 +19,6 @@#include "util/hist.h" /* perf_hist_config */ #include "util/stat.h" /* perf_stat__set_big_num */ #include "util/evsel.h" /* evsel__hw_names, evsel__use_bpf_counters */ -#include "util/addr2line.h" /* addr2line_timeout_ms */ #include "srcline.h" #include "build-id.h" #include "debug.h" @@ -459,7 +458,7 @@ static int perf_default_core_config(const char *var, const char *value) proc_map_timeout =strtoul (value,NULL ,10 );if (!strcmp (var,"core.addr2line-timeout" )) - addr2line_timeout_ms =strtoul (value,NULL ,10 ); + symbol_conf.addr2line_timeout_ms =strtoul (value,NULL ,10 );if (!strcmp (var,"core.addr2line-disable-warn" )) symbol_conf.addr2line_disable_warn =strtoul (value,NULL ,10 );tools/perf/util/symbol_conf.h +1
-0@@ -80,6 +80,7 @@ struct symbol_conf { *bt_stop_list_str;const char *addr2line_path;enum a2l_style addr2line_style[MAX_A2L_STYLE ]; +int addr2line_timeout_ms;unsigned long time_quantum;struct strlist *dso_list, *comm_list,Signature · 1 line
2.53.0