Skip to contentSkip to conversation

Recent perf-tools does not compile on alpha

DISCUSSION matoro 2 participants 2 messages Oct 8, 2022 – Oct 10, 2022

lore
Share & tools
lore

matoro

author
#0 lore raw

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_S
util/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?

#1 lore raw
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_S
util/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

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 add
linux/tools/perf/arch/alpha/include/perf_regs.h