Re: [PATCH v1 08/23] perf perf_regs: Switch from arch string to int e_machine

Arnaldo Carvalho de Melo
2026-01-20T18:50:02Z

On Fri, Jan 16, 2026 at 09:28:34PM -0800, Ian Rogers wrote:
> The arch string requires multiple strcmp to identify things like the
> IP and SP. Switch to passing in an e_machine that in the bulk of cases
> is computed using a current thread load. The e_machine also allows
> identification of 32-bit vs 64-bit processes.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/builtin-script.c | 17 ++-
> tools/perf/util/evsel.c | 14 ++-
> tools/perf/util/perf_regs.c | 105 +++++++++++-------

[ Include dwarf-regs.h to get conditional defines for EM_CSKY and EM_LOONGARCH, not available in old distros ]

- Arnaldo