Recent perf-tools does not compile on alpha
Hi! Recent versions of the perf tools (5.19) do not compile on alpha with the following errors:
util/unwind-libdw.c: In function ‘memory_read’:util/unwind-libdw.c:161:62: error: ‘PERF_REG_SP’ undeclared (first use in this function); did you mean ‘PERF_MEM_S’?
161 | ret = perf_reg_value(&start, &ui->sample->user_regs,
PERF_REG_SP);
|
^~~~~~~~~~~
| PERF_MEM_Sutil/unwind-libdw.c:161:62: note: each undeclared identifier is reported only once for each function it appears in util/unwind-libdw.c: In function ‘unwind__get_entries’:util/unwind-libdw.c:255:53: error: ‘PERF_REG_IP’ undeclared (first use in this function); did you mean ‘PERF_REGS_MAX’?
255 | err = perf_reg_value(&ip, &data->user_regs,
PERF_REG_IP);
| ^~~~~~~~~~~
| PERF_REGS_MAX
Wondering if anybody has some pointers about where these definitions should be coming from on alpha?
Quoted 21 lines · matoro
Hi! Recent versions of the perf tools (5.19) do not compile on alpha with the following errors:
util/unwind-libdw.c: In function ‘memory_read’:util/unwind-libdw.c:161:62: error: ‘PERF_REG_SP’ undeclared (first use in this function); did you mean ‘PERF_MEM_S’?
161 | ret =perf_reg_value(&start, &ui->sample->user_regs, PERF_REG_SP);
|
^~~~~~~~~~~
|PERF_MEM_Sutil/unwind-libdw.c:161:62: note: each undeclared identifier is reported only once for each function it appears inutil/unwind-libdw.c: In function ‘unwind__get_entries’:util/unwind-libdw.c:255:53: error: ‘PERF_REG_IP’ undeclared (first use in this function); did you mean ‘PERF_REGS_MAX’?
255 | err =perf_reg_value(&ip, &data->user_regs, PERF_REG_IP); | ^~~~~~~~~~~ |PERF_REGS_MAX
Quoted 2 lines
Wondering if anybody has some pointers about where these definitions should be coming from on alpha?
Is CONFIG_LIBDW_DWARF_UNWIND being set in the autodetection when it wasn't before? You can override it with NO_LIBDW_DWARF_UNWIND=1
Other than that, you'd have to addlinux/tools/perf/arch/alpha/include/perf_regs.h