From c93a19aaf3f7eae9d6c9070309cc785c18575767 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Sun, 19 May 2024 07:43:45 +0200 Subject: [PATCH] argdist.py: Fix verbose printing b'bytes': decode bytes to str (#5005) The uprobe and kprobe keys are bytes not str they need to be decoded on Python3. Signed-off-by: Bernhard Kaindl --- tools/argdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/argdist.py b/tools/argdist.py index 4a2b4ffa2638..3c8f6d612192 100755 --- a/tools/argdist.py +++ b/tools/argdist.py @@ -726,8 +726,8 @@ def _attach(self): for probe in self.probes: probe.attach(self.bpf) if self.args.verbose: - print("open uprobes: %s" % list(self.bpf.uprobe_fds.keys())) - print("open kprobes: %s" % list(self.bpf.kprobe_fds.keys())) + print("open uprobes: [%s]" % b", ".join(self.bpf.uprobe_fds.keys()).decode()) + print("open kprobes: [%s]" % b", ".join(self.bpf.kprobe_fds.keys()).decode()) def _main_loop(self): count_so_far = 0