Make 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
#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>
---
tools/perf/util/config.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 0452fbc6c085..31541e03aab7 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -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;
}
--
2.53.0
On Wed, Mar 25, 2026 at 01:06:25PM +0100, Thomas Richter wrote: > Make 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 > # > > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> > Cc: Ian Rogers <irogers@google.com> > --- > tools/perf/util/config.c | 3 +++ > 1 file changed, 3 insertions(+) Can you please update Documentation/perf-config.txt as well? > > diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c > index 0452fbc6c085..31541e03aab7 100644 > --- a/tools/perf/util/config.c > +++ b/tools/perf/util/config.c > @@ -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); Sashiko review: Please use perf_config_bool(). Thanks, Namhyung > + > /* Add other config variables here. */ > return 0; > } > -- > 2.53.0 >
On Wed, Mar 25, 2026 at 5:06 AM Thomas Richter <tmricht@linux.ibm.com> wrote: > > Make 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 > # > > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> > Cc: Ian Rogers <irogers@google.com> Reviewed-by: Ian Rogers <irogers@google.com> Thanks, Ian > --- > tools/perf/util/config.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c > index 0452fbc6c085..31541e03aab7 100644 > --- a/tools/perf/util/config.c > +++ b/tools/perf/util/config.c > @@ -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; > } > -- > 2.53.0 >
© 2016 - 2026 Red Hat, Inc.