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

Arnaldo Carvalho de Melo acme at kernel.org
Tue Jan 20 10:49:59 PST 2026


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 at 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



More information about the linux-riscv mailing list