[PATCH v6 02/26] perf trace: Include the augmented arg header in nanosleep's payload length

From: Ian Rogers

Date: Mon Sep 28 2026 - 14:32:11 EST


Unlike the other augmenters, sys_enter_nanosleep() leaves the struct
augmented_arg size and err fields out of the record length, so the
output stops 8 bytes short of the end of the timespec payload. Count
the header.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
index f7c9eb49648f..cc70861a23d6 100644
--- a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
+++ b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
@@ -419,7 +419,8 @@ int sys_enter_nanosleep(struct syscall_enter_args *args)
{
struct augmented_args_payload *augmented_args = augmented_args_payload();
const void *req_arg = (const void *)args->args[0];
- unsigned int len = sizeof(augmented_args->args);
+ /* the size + err in all 'augmented_arg' structs */
+ unsigned int len = sizeof(u64) + sizeof(augmented_args->args);
__u32 size = sizeof(struct timespec64);
int err;

--
2.56.0.rc1.315.gc6ed9934b7-goog