[PATCH v2 2/3] perf config: Make symbol_conf::addr2line_disable_warn configurable

Thomas Richter
2026-04-02T08:02:21Z

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>
Reviewed-by: Ian Rogers <irogers@google.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