[PATCH 1/3] perf config: Rename symbol_conf::disable_add2line_warn

Thomas Richter posted 3 patches 1 week, 1 day ago
There is a newer version of this series
[PATCH 1/3] perf config: Rename symbol_conf::disable_add2line_warn
Posted by Thomas Richter 1 week, 1 day ago
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.

Fixes: 257046a36750a ("perf srcline: Fallback between addr2line implementations")
Cc: Ian Rogers <irogers@google.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
 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(-)

diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 59bf1f72d12e..8a93e56f4a7e 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -1353,7 +1353,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;
 
@@ -1987,7 +1987,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;
diff --git a/tools/perf/util/addr2line.c b/tools/perf/util/addr2line.c
index 31c0391fffa3..e9f084db0802 100644
--- a/tools/perf/util/addr2line.c
+++ b/tools/perf/util/addr2line.c
@@ -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;
diff --git a/tools/perf/util/block-info.c b/tools/perf/util/block-info.c
index 649392bee7ed..8d3a9a661f26 100644
--- a/tools/perf/util/block-info.c
+++ b/tools/perf/util/block-info.c
@@ -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);
diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c
index 63ea3fb53e77..c1c12308cc12 100644
--- a/tools/perf/util/libbfd.c
+++ b/tools/perf/util/libbfd.c
@@ -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;
 	}
diff --git a/tools/perf/util/symbol_conf.h b/tools/perf/util/symbol_conf.h
index 71bb17372a6c..ff229942fbb1 100644
--- a/tools/perf/util/symbol_conf.h
+++ b/tools/perf/util/symbol_conf.h
@@ -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,
-- 
2.53.0
Re: [PATCH 1/3] perf config: Rename symbol_conf::disable_add2line_warn
Posted by Ian Rogers 1 week, 1 day ago
On Wed, Mar 25, 2026 at 5:06 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> 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.
>
> Fixes: 257046a36750a ("perf srcline: Fallback between addr2line implementations")
> Cc: Ian Rogers <irogers@google.com>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  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(-)
>
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index 59bf1f72d12e..8a93e56f4a7e 100644
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -1353,7 +1353,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;
>
> @@ -1987,7 +1987,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;
> diff --git a/tools/perf/util/addr2line.c b/tools/perf/util/addr2line.c
> index 31c0391fffa3..e9f084db0802 100644
> --- a/tools/perf/util/addr2line.c
> +++ b/tools/perf/util/addr2line.c
> @@ -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;
> diff --git a/tools/perf/util/block-info.c b/tools/perf/util/block-info.c
> index 649392bee7ed..8d3a9a661f26 100644
> --- a/tools/perf/util/block-info.c
> +++ b/tools/perf/util/block-info.c
> @@ -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);
> diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c
> index 63ea3fb53e77..c1c12308cc12 100644
> --- a/tools/perf/util/libbfd.c
> +++ b/tools/perf/util/libbfd.c
> @@ -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;
>         }
> diff --git a/tools/perf/util/symbol_conf.h b/tools/perf/util/symbol_conf.h
> index 71bb17372a6c..ff229942fbb1 100644
> --- a/tools/perf/util/symbol_conf.h
> +++ b/tools/perf/util/symbol_conf.h
> @@ -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,
> --
> 2.53.0
>
Re: [PATCH 1/3] perf config: Rename symbol_conf::disable_add2line_warn
Posted by Ian Rogers 1 day, 5 hours ago
On Wed, Mar 25, 2026 at 8:02 AM Ian Rogers <irogers@google.com> wrote:
>
> On Wed, Mar 25, 2026 at 5:06 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> >
> > 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.
> >
> > Fixes: 257046a36750a ("perf srcline: Fallback between addr2line implementations")
> > Cc: Ian Rogers <irogers@google.com>
> > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
>
> Reviewed-by: Ian Rogers <irogers@google.com>

Ping. Thanks,
Ian

> Thanks,
> Ian
>
> > ---
> >  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(-)
> >
> > diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> > index 59bf1f72d12e..8a93e56f4a7e 100644
> > --- a/tools/perf/builtin-diff.c
> > +++ b/tools/perf/builtin-diff.c
> > @@ -1353,7 +1353,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;
> >
> > @@ -1987,7 +1987,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;
> > diff --git a/tools/perf/util/addr2line.c b/tools/perf/util/addr2line.c
> > index 31c0391fffa3..e9f084db0802 100644
> > --- a/tools/perf/util/addr2line.c
> > +++ b/tools/perf/util/addr2line.c
> > @@ -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;
> > diff --git a/tools/perf/util/block-info.c b/tools/perf/util/block-info.c
> > index 649392bee7ed..8d3a9a661f26 100644
> > --- a/tools/perf/util/block-info.c
> > +++ b/tools/perf/util/block-info.c
> > @@ -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);
> > diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c
> > index 63ea3fb53e77..c1c12308cc12 100644
> > --- a/tools/perf/util/libbfd.c
> > +++ b/tools/perf/util/libbfd.c
> > @@ -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;
> >         }
> > diff --git a/tools/perf/util/symbol_conf.h b/tools/perf/util/symbol_conf.h
> > index 71bb17372a6c..ff229942fbb1 100644
> > --- a/tools/perf/util/symbol_conf.h
> > +++ b/tools/perf/util/symbol_conf.h
> > @@ -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,
> > --
> > 2.53.0
> >