Skip to content

Commit

Permalink
argdist.py: Fix verbose printing b'bytes': decode bytes to str (iovis…
Browse files Browse the repository at this point in the history
…or#5005)

The uprobe and kprobe keys are bytes not str they need to be decoded on Python3.

Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl authored May 19, 2024
1 parent 8caf040 commit c93a19a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/argdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c93a19a

Please sign in to comment.