From 5e5bfadf9335cf6e01c2c7a9f0ed4e80e9946159 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 8 Jul 2025 15:24:12 +0200 Subject: [PATCH] hack/podman_cleanup_tracer.bt: use new max str lenth The default has been set to 1024 which should bee good enough and better than having to unroll this loop like that. This is supported since bpftrace 0.22 which is in fedora 42. Signed-off-by: Paul Holzinger --- hack/podman_cleanup_tracer.bt | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/hack/podman_cleanup_tracer.bt b/hack/podman_cleanup_tracer.bt index 42c46cde9a..a31212a12e 100755 --- a/hack/podman_cleanup_tracer.bt +++ b/hack/podman_cleanup_tracer.bt @@ -133,19 +133,5 @@ tracepoint:syscalls:sys_enter_write comm ); - // String size limit is is 64 by default, this includes the 0 byte and when we - // hit the string limit it also adds "..." when using 63 so we use 63 as len here. - // While upstream fixed these low string limits (https://github.com/bpftrace/bpftrace/issues/305) - // it is not yet in older distro version we use so we cannot use that yet. - // Thus manually print several times. - $len = 62; - $offset = 62; - printf("%s", str(args.buf, $len)); - - unroll(10) { - if ((int64)args.count > $offset ) { - printf("%s", str(args.buf + $offset, $len)); - } - $offset += $len - } + printf("%s", str(args.buf, args.count)); }