[PATCH v8 11/17] perf c2c: Use perf_env e_machine rather than arch

Ian Rogers
2026-05-02T07:00:16Z

Use the e_machine rather than arch string matching for AARCH64.

Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/builtin-c2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 72a7802775ee..09c8352a922c 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -3202,7 +3202,7 @@ static int perf_c2c__report(int argc, const char **argv)
* default display type.
*/
if (!display) {
- if (!strcmp(perf_env__arch(env), "arm64"))
+ if (perf_env__e_machine(env, /*e_flags=*/NULL) == EM_AARCH64)
display = "peer";
else
display = "tot";
--
2.54.0.545.g6539524ca2-goog