From: Ian Rogers <irogers@google.com>
To: Tony Jones <tonyj@suse.de>, Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Howard Chu <howardchu95@gmail.com>,
Stephen Brennan <stephen.s.brennan@oracle.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: [PATCH v3 3/7] perf addr2line.c: Rename a2l_style to cmd_a2l_style
Date: Sat, 10 Jan 2026 20:13:34 -0800 [thread overview]
Message-ID: <20260111041338.1817056-4-irogers@google.com> (raw)
In-Reply-To: <20260111041338.1817056-1-irogers@google.com>
The a2l_style is only relevant to the command line version, so rename
to make this clearer.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/util/addr2line.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/perf/util/addr2line.c b/tools/perf/util/addr2line.c
index f2d94a3272d7..0f1499350d47 100644
--- a/tools/perf/util/addr2line.c
+++ b/tools/perf/util/addr2line.c
@@ -90,16 +90,16 @@ static struct child_process *addr2line_subprocess_init(const char *addr2line_pat
return a2l;
}
-enum a2l_style {
+enum cmd_a2l_style {
BROKEN,
GNU_BINUTILS,
LLVM,
};
-static enum a2l_style addr2line_configure(struct child_process *a2l, const char *dso_name)
+static enum cmd_a2l_style cmd_addr2line_configure(struct child_process *a2l, const char *dso_name)
{
static bool cached;
- static enum a2l_style style;
+ static enum cmd_a2l_style style;
if (!cached) {
char buf[128];
@@ -149,7 +149,7 @@ static enum a2l_style addr2line_configure(struct child_process *a2l, const char
}
static int read_addr2line_record(struct io *io,
- enum a2l_style style,
+ enum cmd_a2l_style style,
const char *dso_name,
u64 addr,
bool first,
@@ -298,7 +298,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,
char buf[128];
ssize_t written;
struct io io = { .eof = false };
- enum a2l_style a2l_style;
+ enum cmd_a2l_style cmd_a2l_style;
if (!a2l) {
if (!filename__has_section(dso_name, ".debug_line"))
@@ -314,8 +314,8 @@ int cmd__addr2line(const char *dso_name, u64 addr,
pr_warning("%s %s: addr2line_subprocess_init failed\n", __func__, dso_name);
goto out;
}
- a2l_style = addr2line_configure(a2l, dso_name);
- if (a2l_style == BROKEN)
+ cmd_a2l_style = cmd_addr2line_configure(a2l, dso_name);
+ if (cmd_a2l_style == BROKEN)
goto out;
/*
@@ -336,7 +336,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,
}
io__init(&io, a2l->out, buf, sizeof(buf));
io.timeout_ms = addr2line_timeout_ms;
- switch (read_addr2line_record(&io, a2l_style, dso_name, addr, /*first=*/true,
+ 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)
@@ -351,7 +351,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,
* binutils, also force a non-zero address as we're no longer
* reading that record.
*/
- switch (read_addr2line_record(&io, a2l_style, dso_name,
+ switch (read_addr2line_record(&io, cmd_a2l_style, dso_name,
/*addr=*/1, /*first=*/true,
NULL, NULL, NULL)) {
case -1:
@@ -397,7 +397,7 @@ int cmd__addr2line(const char *dso_name, u64 addr,
* as we're reading records beyond the first.
*/
while ((record_status = read_addr2line_record(&io,
- a2l_style,
+ cmd_a2l_style,
dso_name,
/*addr=*/1,
/*first=*/false,
--
2.52.0.457.g6b5491de43-goog
next prev parent reply other threads:[~2026-01-11 4:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 4:13 [PATCH v3 0/7] perf: Add a libdw addr2line implementation Ian Rogers
2026-01-11 4:13 ` [PATCH v3 1/7] perf unwind-libdw: Fix invalid reference counts Ian Rogers
2026-01-11 4:13 ` [PATCH v3 2/7] perf addr2line: Add a libdw implementation Ian Rogers
2026-01-12 19:52 ` Arnaldo Carvalho de Melo
2026-01-12 21:23 ` Ian Rogers
2026-01-11 4:13 ` Ian Rogers [this message]
2026-01-11 4:13 ` [PATCH v3 4/7] perf srcline: Add configuration support for the addr2line style Ian Rogers
2026-01-11 4:13 ` [PATCH v3 5/7] perf callchain: Fix srcline printing with inlines Ian Rogers
2026-01-11 4:13 ` [PATCH v3 6/7] perf test workload: Add inlineloop test workload Ian Rogers
2026-01-11 4:13 ` [PATCH v3 7/7] perf test: Test addr2line unwinding works with inline functions Ian Rogers
2026-01-12 11:18 ` [PATCH v3 0/7] perf: Add a libdw addr2line implementation James Clark
2026-01-12 14:49 ` Ian Rogers
2026-01-12 18:29 ` Ian Rogers
2026-01-13 12:03 ` James Clark
2026-01-13 23:47 ` Ian Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260111041338.1817056-4-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=howardchu95@gmail.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=stephen.s.brennan@oracle.com \
--cc=tonyj@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox