Re: [PATCH/RFT] Re: [PATCH v5 1/8] perf trace: Fix iteration of syscall ids in syscalltbl->entries

From: Namhyung Kim
Date: Thu Oct 10 2024 - 12:53:35 EST


On Thu, Oct 10, 2024 at 09:29:01AM -0700, Namhyung Kim wrote:
> On Thu, Oct 10, 2024 at 10:22:12AM +0200, Jiri Slaby wrote:
> > From 3d4f06d79c949a8f155c20652b4f685540899ad4 Mon Sep 17 00:00:00 2001
> > From: Jiri Slaby <jslaby@xxxxxxx>
> > Date: Thu, 10 Oct 2024 09:57:07 +0200
> > Subject: [PATCH] perf: fix non-listed archs
> >
> > Suggested-by: Howard Chu <howardchu95@xxxxxxxxx>
> > Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
>
> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Also with,

Fixes: 7a2fb5619cc1fb53 ("perf trace: Fix iteration of syscall ids in syscalltbl->entries")

>
> Arnaldo, can you please pick this up for v6.12?
>
> Thanks,
> Namhyung
>
> > ---
> > tools/perf/util/syscalltbl.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c
> > index 7c15dec6900d..6c45ded922b6 100644
> > --- a/tools/perf/util/syscalltbl.c
> > +++ b/tools/perf/util/syscalltbl.c
> > @@ -46,6 +46,11 @@ static const char *const *syscalltbl_native = syscalltbl_mips_n64;
> > #include <asm/syscalls.c>
> > const int syscalltbl_native_max_id = SYSCALLTBL_LOONGARCH_MAX_ID;
> > static const char *const *syscalltbl_native = syscalltbl_loongarch;
> > +#else
> > +const int syscalltbl_native_max_id = 0;
> > +static const char *const syscalltbl_native[] = {
> > + [0] = "unknown",
> > +};
> > #endif
> >
> > struct syscall {
> > @@ -182,6 +187,11 @@ int syscalltbl__id(struct syscalltbl *tbl, const char *name)
> > return audit_name_to_syscall(name, tbl->audit_machine);
> > }
> >
> > +int syscalltbl__id_at_idx(struct syscalltbl *tbl __maybe_unused, int idx)
> > +{
> > + return idx;
> > +}
> > +
> > int syscalltbl__strglobmatch_next(struct syscalltbl *tbl __maybe_unused,
> > const char *syscall_glob __maybe_unused, int *idx __maybe_unused)
> > {
> > --
> > 2.46.1
> >
>