Skip to content

Commit 5d35634

Browse files
Jiri Slabyacmel
authored andcommitted
perf trace: Fix non-listed archs in the syscalltbl routines
This fixes a build breakage on 32-bit arm, where the syscalltbl__id_at_idx() function was missing. Committer notes: Generating a proper syscall table from a copy of arch/arm/tools/syscall.tbl ends up being too big a patch for this rc stage, I started doing it but while testing noticed some other problems with using BPF to collect pointer args on arm7 (32-bit) will maybe continue trying to make it work on the next cycle... Fixes: 7a2fb56 ("perf trace: Fix iteration of syscall ids in syscalltbl->entries") Suggested-by: Howard Chu <[email protected]> Signed-off-by: <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Howard Chu <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 7fbff3c commit 5d35634

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/perf/util/syscalltbl.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ static const char *const *syscalltbl_native = syscalltbl_mips_n64;
4646
#include <asm/syscalls.c>
4747
const int syscalltbl_native_max_id = SYSCALLTBL_LOONGARCH_MAX_ID;
4848
static const char *const *syscalltbl_native = syscalltbl_loongarch;
49+
#else
50+
const int syscalltbl_native_max_id = 0;
51+
static const char *const syscalltbl_native[] = {
52+
[0] = "unknown",
53+
};
4954
#endif
5055

5156
struct syscall {
@@ -182,6 +187,11 @@ int syscalltbl__id(struct syscalltbl *tbl, const char *name)
182187
return audit_name_to_syscall(name, tbl->audit_machine);
183188
}
184189

190+
int syscalltbl__id_at_idx(struct syscalltbl *tbl __maybe_unused, int idx)
191+
{
192+
return idx;
193+
}
194+
185195
int syscalltbl__strglobmatch_next(struct syscalltbl *tbl __maybe_unused,
186196
const char *syscall_glob __maybe_unused, int *idx __maybe_unused)
187197
{

0 commit comments

Comments
 (0)