summaryrefslogtreecommitdiff
path: root/internal/tracepoints
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-30 16:20:36 +0300
committerPaul Buetow <paul@buetow.org>2026-05-30 16:20:36 +0300
commit65d276b67e65427e8cd25fd45b142e6fff1259f0 (patch)
tree3e7d60dd6e0862fbc8060d98f340135db63edc4d /internal/tracepoints
parent4e6d9e1a6c74e0bdb4d89df10ef22a664f84737f (diff)
sendfile64: capture out_fd instead of dropping both fds
sendfile64(out_fd, in_fd, offset, count) transfers bytes between two file descriptors in the kernel and returns the number of bytes written to out_fd. Its tracepoint fields carry no field literally named "fd", so it fell through to KindNull and captured no descriptor at all - inconsistent with its sibling copy_file_range (KindFd) and the read/write/sendto/recvfrom families. Add an explicit sys_enter_sendfile64 -> KindFd override that captures out_fd (args[0], the destination the bytes are written to), matching the single-fd KindFd convention. The return value stays TransferClassified, consistent with copy_file_range/splice/tee/vmsplice. Family stays Network (sendfile is historically socket-oriented; copy_file_range=FS is pure file-to-file). Update docs/syscall-tracing-plan.md (move sendfile64 from null to fd kind), regenerate C/Go artifacts, fix the phase-A classify assertion, and add TestClassifySendfile64CapturesOutFd as a lock-in + negative test. The existing TestRetbytesPhaseA integration test still passes with the runtime change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/tracepoints')
-rw-r--r--internal/tracepoints/generated_tracepoints.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/tracepoints/generated_tracepoints.go b/internal/tracepoints/generated_tracepoints.go
index b0f9112..38b1f4c 100644
--- a/internal/tracepoints/generated_tracepoints.go
+++ b/internal/tracepoints/generated_tracepoints.go
@@ -1388,7 +1388,7 @@ var syscallKinds = map[string]string{
"semget": "sysv-id",
"semop": "sysv-op",
"semtimedop": "sysv-op",
- "sendfile64": "null",
+ "sendfile64": "fd",
"sendmmsg": "fd",
"sendmsg": "fd",
"sendto": "fd",