From nobody Wed Dec 17 13:54:29 2025 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF0771C3BFC for ; Tue, 18 Mar 2025 03:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742268729; cv=none; b=S8i2mmQR3nkfSpi/qwkZlMmOpyUPVCP3i8stHfZ3wzwoOjH+Io2WhogGr3uOZx5V2GVvpQS6+6mX8W7myX6IwNPJLh9LAa+vH1GX6CJRWcF07sHNWx2kjv5+LgFwpefkmJPioTe8B5Srb69LzxEE1ZbqNhwrbzQv4Q60/WeJ0xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742268729; c=relaxed/simple; bh=um3SJglU94UOtGph5kPkY7hsQGJVI104ifL7D7mJo9g=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=c3nmP5IIRnPN83LBLmPZYM/FXdfLsLbaTGawcY5Jw/EeNfam2+YlbAyH5Bbku6yQC1Gzj2uCd7Qqe9V0VhqSsAWVFlCGrm4CI2Po9nJDH4IiEi8XNqHrU157tz+nppUF/Tnooqj7gVzQxTjHHme9y0dT18imPbTrwRVpruTzPlk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=SjU8Uqr6; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SjU8Uqr6" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e586f6c6289so7288391276.1 for ; Mon, 17 Mar 2025 20:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1742268725; x=1742873525; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=O1nK5uvxYAHiuhO7vp1MDxMA7qbFQ4SO2G8OmMvCRSM=; b=SjU8Uqr6HKgM8/uTLt3NDQcLv63AR1XQ3x4mCrbo4lzSouQ+UQcBg2lXPOp1E/rKua KzEXW+rRoR6GSeps1y1h4KH4pp3rnCXXPaAlwZxif7V5zM21I4F/rTzIkbLVBuEHN3Co Ex2D1+lzOtYx+DlIrF6+TnlO6fSt6R9ROP5qSnuVzTXGWdyMbmRs65AXy89A3A3nJ2uq ZhNkZLQLc+If03Zk9u1JWicM2OD51c9bY1501lXcmUic22Gnha0FkdOnVUT0ljRLDeL8 Wu1buHIamt54Uzj2wPYMqrqh98a2Zbv9Hxq00kQx0GDUyRlDEKCeR6GgrSINs2fZmU/h s3/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742268725; x=1742873525; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=O1nK5uvxYAHiuhO7vp1MDxMA7qbFQ4SO2G8OmMvCRSM=; b=K6i1dmQ5o91STxuyLuAvam7AJU3+4ax2il/elz59uTHx8CKfJVfrzDHXCvKbqJXTmm q6qqGiwq8x9ezOfGXfAUnvi/EdwG1doc376ryBn8YP8XwaugzovXwTBf1STF6ZA7EiLg vHFfCoVWLMXIlnfReM/56WTtREj5IKDlMcvieOCuLsFNKi9QTwdn9E6WIfjalSpQIE61 azwUPYJaguRzs2Br/esXJunseo7is4Y16i/rh7kxVrqQVStuq5jGxRXQjuEJwAGuDMrL UQFU1wEpPIZlsNPETC0HiDjgzNFRJFnrGotK4lfBOoyJJsGXcaKZB6OSeT0AOMf/3QDX 9w3g== X-Forwarded-Encrypted: i=1; AJvYcCX8cv19CUOhrYuRu+0IUEtouJP25asvk+Bh35JtelkmH71b81u/7tN8unecdOY7uml2/rpB7ZvIsS2J9/U=@vger.kernel.org X-Gm-Message-State: AOJu0Ywmqm95pqizFlh4MVkN8Cbwe2gFpzQQq313GWp/4YIdTQQi/Wtz DRD+2bddHKy0kgOeuPZ544V7OBIzSqEhKJMEeV5ev5wHi+5adfWQKmJlk1QLCoPwpakpIp79LE5 tqV/w5Q== X-Google-Smtp-Source: AGHT+IHOHld8kAja2ZTsy6PQxGq+xeGKdTx0PIpDQifHvtvLRIbXlfuclsCYVeCW3FCQzME9t5A22A910VYs X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:ef29:15ce:a42a:b69f]) (user=irogers job=sendgmr) by 2002:a25:6ac4:0:b0:e63:ef1a:f7d8 with SMTP id 3f1490d57ef6-e63f65be366mr6867276.5.1742268724494; Mon, 17 Mar 2025 20:32:04 -0700 (PDT) Date: Mon, 17 Mar 2025 20:31:41 -0700 In-Reply-To: <20250318033150.119174-1-irogers@google.com> Message-Id: <20250318033150.119174-5-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250318033150.119174-1-irogers@google.com> X-Mailer: git-send-email 2.49.0.rc1.451.g8f38331e32-goog Subject: [PATCH v6 04/13] perf trace: Reorganize syscalls From: Ian Rogers To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , guoren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Charlie Jenkins , Bibo Mao , Huacai Chen , Catalin Marinas , Jiri Slaby , "=?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?=" , Howard Chu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "linux-csky@vger.kernel.org" , linux-riscv@lists.infradead.org, Arnd Bergmann Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Identify struct syscall information in the syscalls table by a machine type and syscall number, not just system call number. Having the machine type means that 32-bit system calls can be differentiated from 64-bit ones on a machine capable of both. Having a table for all machine types and all system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 197 +++++++++++++++++++++++++------------ 1 file changed, 132 insertions(+), 65 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 092c5f6404ba..bdfd3d5128b7 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -66,6 +66,7 @@ #include "syscalltbl.h" #include "../perf.h" #include "trace_augment.h" +#include "dwarf-regs.h" =20 #include #include @@ -86,6 +87,7 @@ =20 #include #include +#include =20 #ifdef HAVE_LIBTRACEEVENT #include @@ -149,7 +151,10 @@ struct trace { struct perf_tool tool; struct syscalltbl *sctbl; struct { + /** Sorted sycall numbers used by the trace. */ struct syscall *table; + /** Size of table. */ + size_t table_size; struct { struct evsel *sys_enter, *sys_exit, @@ -1454,22 +1459,37 @@ static const struct syscall_fmt *syscall_fmt__find_= by_alias(const char *alias) return __syscall_fmt__find_by_alias(syscall_fmts, nmemb, alias); } =20 -/* - * is_exit: is this "exit" or "exit_group"? - * is_open: is this "open" or "openat"? To associate the fd returned in sy= s_exit with the pathname in sys_enter. - * args_size: sum of the sizes of the syscall arguments, anything after th= at is augmented stuff: pathname for openat, etc. - * nonexistent: Just a hole in the syscall table, syscall id not allocated +/** + * struct syscall */ struct syscall { + /** @e_machine: The ELF machine associated with the entry. */ + int e_machine; + /** @id: id value from the tracepoint, the system call number. */ + int id; struct tep_event *tp_format; int nr_args; + /** + * @args_size: sum of the sizes of the syscall arguments, anything + * after that is augmented stuff: pathname for openat, etc. + */ + int args_size; struct { struct bpf_program *sys_enter, *sys_exit; } bpf_prog; + /** @is_exit: is this "exit" or "exit_group"? */ bool is_exit; + /** + * @is_open: is this "open" or "openat"? To associate the fd returned in + * sys_exit with the pathname in sys_enter. + */ bool is_open; + /** + * @nonexistent: Name lookup failed. Just a hole in the syscall table, + * syscall id not allocated. + */ bool nonexistent; bool use_btf; struct tep_format_field *args; @@ -2107,22 +2127,21 @@ static int syscall__set_arg_fmts(struct syscall *sc) return 0; } =20 -static int trace__read_syscall_info(struct trace *trace, int id) +static int syscall__read_info(struct syscall *sc, struct trace *trace) { char tp_name[128]; - struct syscall *sc; - const char *name =3D syscalltbl__name(trace->sctbl, id); + const char *name; int err; =20 - if (trace->syscalls.table =3D=3D NULL) { - trace->syscalls.table =3D calloc(trace->sctbl->syscalls.max_id + 1, size= of(*sc)); - if (trace->syscalls.table =3D=3D NULL) - return -ENOMEM; - } - sc =3D trace->syscalls.table + id; if (sc->nonexistent) return -EEXIST; =20 + if (sc->name) { + /* Info already read. */ + return 0; + } + + name =3D syscalltbl__name(trace->sctbl, sc->id); if (name =3D=3D NULL) { sc->nonexistent =3D true; return -EEXIST; @@ -2145,15 +2164,16 @@ static int trace__read_syscall_info(struct trace *t= race, int id) */ if (IS_ERR(sc->tp_format)) { sc->nonexistent =3D true; - return PTR_ERR(sc->tp_format); + err =3D PTR_ERR(sc->tp_format); + sc->tp_format =3D NULL; + return err; } =20 /* * The tracepoint format contains __syscall_nr field, so it's one more * than the actual number of syscall arguments. */ - if (syscall__alloc_arg_fmts(sc, IS_ERR(sc->tp_format) ? - RAW_SYSCALL_ARGS_NUM : sc->tp_format->format.nr_fields - 1)) + if (syscall__alloc_arg_fmts(sc, sc->tp_format->format.nr_fields - 1)) return -ENOMEM; =20 sc->args =3D sc->tp_format->format.fields; @@ -2442,13 +2462,69 @@ static size_t syscall__scnprintf_args(struct syscal= l *sc, char *bf, size_t size, return printed; } =20 +static void syscall__init(struct syscall *sc, int e_machine, int id) +{ + memset(sc, 0, sizeof(*sc)); + sc->e_machine =3D e_machine; + sc->id =3D id; +} + +static void syscall__exit(struct syscall *sc) +{ + if (!sc) + return; + + zfree(&sc->arg_fmt); +} + +static int syscall__cmp(const void *va, const void *vb) +{ + const struct syscall *a =3D va, *b =3D vb; + + if (a->e_machine !=3D b->e_machine) + return a->e_machine - b->e_machine; + + return a->id - b->id; +} + +static struct syscall *trace__find_syscall(struct trace *trace, int e_mach= ine, int id) +{ + struct syscall key =3D { + .e_machine =3D e_machine, + .id =3D id, + }; + struct syscall *sc, *tmp; + + if (trace->syscalls.table) { + sc =3D bsearch(&key, trace->syscalls.table, trace->syscalls.table_size, + sizeof(struct syscall), syscall__cmp); + if (sc) + return sc; + } + + tmp =3D reallocarray(trace->syscalls.table, trace->syscalls.table_size + = 1, + sizeof(struct syscall)); + if (!tmp) + return NULL; + + trace->syscalls.table =3D tmp; + sc =3D &trace->syscalls.table[trace->syscalls.table_size++]; + syscall__init(sc, e_machine, id); + qsort(trace->syscalls.table, trace->syscalls.table_size, sizeof(struct sy= scall), + syscall__cmp); + sc =3D bsearch(&key, trace->syscalls.table, trace->syscalls.table_size, + sizeof(struct syscall), syscall__cmp); + return sc; +} + typedef int (*tracepoint_handler)(struct trace *trace, struct evsel *evsel, union perf_event *event, struct perf_sample *sample); =20 -static struct syscall *trace__syscall_info(struct trace *trace, - struct evsel *evsel, int id) +static struct syscall *trace__syscall_info(struct trace *trace, struct evs= el *evsel, + int e_machine, int id) { + struct syscall *sc; int err =3D 0; =20 if (id < 0) { @@ -2473,28 +2549,20 @@ static struct syscall *trace__syscall_info(struct t= race *trace, =20 err =3D -EINVAL; =20 - if (id > trace->sctbl->syscalls.max_id) { - goto out_cant_read; - } - - if ((trace->syscalls.table =3D=3D NULL || trace->syscalls.table[id].name = =3D=3D NULL) && - (err =3D trace__read_syscall_info(trace, id)) !=3D 0) - goto out_cant_read; - - if (trace->syscalls.table && trace->syscalls.table[id].nonexistent) - goto out_cant_read; + sc =3D trace__find_syscall(trace, e_machine, id); + if (sc) + err =3D syscall__read_info(sc, trace); =20 - return &trace->syscalls.table[id]; - -out_cant_read: - if (verbose > 0) { + if (err && verbose > 0) { char sbuf[STRERR_BUFSIZE]; - fprintf(trace->output, "Problems reading syscall %d: %d (%s)", id, -err,= str_error_r(-err, sbuf, sizeof(sbuf))); - if (id <=3D trace->sctbl->syscalls.max_id && trace->syscalls.table[id].n= ame !=3D NULL) - fprintf(trace->output, "(%s)", trace->syscalls.table[id].name); + + fprintf(trace->output, "Problems reading syscall %d: %d (%s)", id, -err, + str_error_r(-err, sbuf, sizeof(sbuf))); + if (sc && sc->name) + fprintf(trace->output, "(%s)", sc->name); fputs(" information\n", trace->output); } - return NULL; + return err ? NULL : sc; } =20 struct syscall_stats { @@ -2643,14 +2711,6 @@ static void *syscall__augmented_args(struct syscall = *sc, struct perf_sample *sam return NULL; } =20 -static void syscall__exit(struct syscall *sc) -{ - if (!sc) - return; - - zfree(&sc->arg_fmt); -} - static int trace__sys_enter(struct trace *trace, struct evsel *evsel, union perf_event *event __maybe_unused, struct perf_sample *sample) @@ -2662,7 +2722,7 @@ static int trace__sys_enter(struct trace *trace, stru= ct evsel *evsel, int id =3D perf_evsel__sc_tp_uint(evsel, id, sample), err =3D -1; int augmented_args_size =3D 0; void *augmented_args =3D NULL; - struct syscall *sc =3D trace__syscall_info(trace, evsel, id); + struct syscall *sc =3D trace__syscall_info(trace, evsel, EM_HOST, id); struct thread_trace *ttrace; =20 if (sc =3D=3D NULL) @@ -2736,7 +2796,7 @@ static int trace__fprintf_sys_enter(struct trace *tra= ce, struct evsel *evsel, struct thread_trace *ttrace; struct thread *thread; int id =3D perf_evsel__sc_tp_uint(evsel, id, sample), err =3D -1; - struct syscall *sc =3D trace__syscall_info(trace, evsel, id); + struct syscall *sc =3D trace__syscall_info(trace, evsel, EM_HOST, id); char msg[1024]; void *args, *augmented_args =3D NULL; int augmented_args_size; @@ -2811,7 +2871,7 @@ static int trace__sys_exit(struct trace *trace, struc= t evsel *evsel, struct thread *thread; int id =3D perf_evsel__sc_tp_uint(evsel, id, sample), err =3D -1, callcha= in_ret =3D 0, printed =3D 0; int alignment =3D trace->args_alignment; - struct syscall *sc =3D trace__syscall_info(trace, evsel, id); + struct syscall *sc =3D trace__syscall_info(trace, evsel, EM_HOST, id); struct thread_trace *ttrace; =20 if (sc =3D=3D NULL) @@ -3164,7 +3224,7 @@ static int trace__event_handler(struct trace *trace, = struct evsel *evsel, =20 if (evsel =3D=3D trace->syscalls.events.bpf_output) { int id =3D perf_evsel__sc_tp_uint(evsel, id, sample); - struct syscall *sc =3D trace__syscall_info(trace, evsel, id); + struct syscall *sc =3D trace__syscall_info(trace, evsel, EM_HOST, id); =20 if (sc) { fprintf(trace->output, "%s(", sc->name); @@ -3673,7 +3733,7 @@ static struct bpf_program *trace__find_syscall_bpf_pr= og(struct trace *trace, str =20 static void trace__init_syscall_bpf_progs(struct trace *trace, int id) { - struct syscall *sc =3D trace__syscall_info(trace, NULL, id); + struct syscall *sc =3D trace__syscall_info(trace, NULL, EM_HOST, id); =20 if (sc =3D=3D NULL) return; @@ -3684,20 +3744,20 @@ static void trace__init_syscall_bpf_progs(struct tr= ace *trace, int id) =20 static int trace__bpf_prog_sys_enter_fd(struct trace *trace, int id) { - struct syscall *sc =3D trace__syscall_info(trace, NULL, id); + struct syscall *sc =3D trace__syscall_info(trace, NULL, EM_HOST, id); return sc ? bpf_program__fd(sc->bpf_prog.sys_enter) : bpf_program__fd(tra= ce->skel->progs.syscall_unaugmented); } =20 static int trace__bpf_prog_sys_exit_fd(struct trace *trace, int id) { - struct syscall *sc =3D trace__syscall_info(trace, NULL, id); + struct syscall *sc =3D trace__syscall_info(trace, NULL, EM_HOST, id); return sc ? bpf_program__fd(sc->bpf_prog.sys_exit) : bpf_program__fd(trac= e->skel->progs.syscall_unaugmented); } =20 static int trace__bpf_sys_enter_beauty_map(struct trace *trace, int key, u= nsigned int *beauty_array) { struct tep_format_field *field; - struct syscall *sc =3D trace__syscall_info(trace, NULL, key); + struct syscall *sc =3D trace__syscall_info(trace, NULL, EM_HOST, key); const struct btf_type *bt; char *struct_offset, *tmp, name[32]; bool can_augment =3D false; @@ -3779,13 +3839,14 @@ static int trace__bpf_sys_enter_beauty_map(struct t= race *trace, int key, unsigne return -1; } =20 -static struct bpf_program *trace__find_usable_bpf_prog_entry(struct trace = *trace, struct syscall *sc) +static struct bpf_program *trace__find_usable_bpf_prog_entry(struct trace = *trace, struct syscall *_sc) { + struct syscall sc =3D *_sc; /* Copy as trace__syscall_info may invalidate= pointer. */ struct tep_format_field *field, *candidate_field; /* * We're only interested in syscalls that have a pointer: */ - for (field =3D sc->args; field; field =3D field->next) { + for (field =3D sc.args; field; field =3D field->next) { if (field->flags & TEP_FIELD_IS_POINTER) goto try_to_find_pair; } @@ -3795,15 +3856,16 @@ static struct bpf_program *trace__find_usable_bpf_p= rog_entry(struct trace *trace try_to_find_pair: for (int i =3D 0; i < trace->sctbl->syscalls.nr_entries; ++i) { int id =3D syscalltbl__id_at_idx(trace->sctbl, i); - struct syscall *pair =3D trace__syscall_info(trace, NULL, id); + /* calling trace__syscall_info() may invalidate '_sc' */ + struct syscall *pair =3D trace__syscall_info(trace, NULL, sc.e_machine, = id); struct bpf_program *pair_prog; bool is_candidate =3D false; =20 - if (pair =3D=3D NULL || pair =3D=3D sc || + if (pair =3D=3D NULL || pair->id =3D=3D sc.id || pair->bpf_prog.sys_enter =3D=3D trace->skel->progs.syscall_unaugment= ed) continue; =20 - for (field =3D sc->args, candidate_field =3D pair->args; + for (field =3D sc.args, candidate_field =3D pair->args; field && candidate_field; field =3D field->next, candidate_field = =3D candidate_field->next) { bool is_pointer =3D field->flags & TEP_FIELD_IS_POINTER, candidate_is_pointer =3D candidate_field->flags & TEP_FIELD_IS_POI= NTER; @@ -3870,7 +3932,7 @@ static struct bpf_program *trace__find_usable_bpf_pro= g_entry(struct trace *trace goto next_candidate; } =20 - pr_debug("Reusing \"%s\" BPF sys_enter augmenter for \"%s\"\n", pair->na= me, sc->name); + pr_debug("Reusing \"%s\" BPF sys_enter augmenter for \"%s\"\n", pair->na= me, sc.name); return pair_prog; next_candidate: continue; @@ -3945,7 +4007,7 @@ static int trace__init_syscalls_bpf_prog_array_maps(s= truct trace *trace) */ for (int i =3D 0; i < trace->sctbl->syscalls.nr_entries; ++i) { int key =3D syscalltbl__id_at_idx(trace->sctbl, i); - struct syscall *sc =3D trace__syscall_info(trace, NULL, key); + struct syscall *sc =3D trace__syscall_info(trace, NULL, EM_HOST, key); struct bpf_program *pair_prog; int prog_fd; =20 @@ -3966,7 +4028,11 @@ static int trace__init_syscalls_bpf_prog_array_maps(= struct trace *trace) pair_prog =3D trace__find_usable_bpf_prog_entry(trace, sc); if (pair_prog =3D=3D NULL) continue; - + /* + * Get syscall info again as find usable entry above might + * modify the syscall table and shuffle it. + */ + sc =3D trace__syscall_info(trace, NULL, EM_HOST, key); sc->bpf_prog.sys_enter =3D pair_prog; =20 /* @@ -4761,7 +4827,10 @@ static size_t syscall__dump_stats(struct trace *trac= e, FILE *fp, pct =3D avg ? 100.0 * stddev_stats(&stats->stats) / avg : 0.0; avg /=3D NSEC_PER_MSEC; =20 - sc =3D &trace->syscalls.table[entry->syscall]; + sc =3D trace__syscall_info(trace, /*evsel=3D*/NULL, EM_HOST, entry->sys= call); + if (!sc) + continue; + printed +=3D fprintf(fp, " %-15s", sc->name); printed +=3D fprintf(fp, " %8" PRIu64 " %6" PRIu64 " %9.3f %9.3f %9.3f", n, stats->nr_failures, entry->msecs, min, avg); @@ -5218,12 +5287,10 @@ static int trace__config(const char *var, const cha= r *value, void *arg) =20 static void trace__exit(struct trace *trace) { - int i; - strlist__delete(trace->ev_qualifier); zfree(&trace->ev_qualifier_ids.entries); if (trace->syscalls.table) { - for (i =3D 0; i <=3D trace->sctbl->syscalls.max_id; i++) + for (size_t i =3D 0; i < trace->syscalls.table_size; i++) syscall__exit(&trace->syscalls.table[i]); zfree(&trace->syscalls.table); } --=20 2.49.0.rc1.451.g8f38331e32-goog