Skip to content

Commit

Permalink
uflow: convert bytes to str
Browse files Browse the repository at this point in the history
Python 3 fix, similar to commit 99d1468 and commit 4e4c9e0 for ucalls.

Closes iovisor#1996.
  • Loading branch information
myllynen committed Oct 5, 2018
1 parent e55c68a commit 215fc84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/lib/uflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def print_event(cpu, data, size):
direction = "<- " if event.depth & (1 << 63) else "-> "
print("%-3d %-6d %-6d %-8.3f %-40s" % (cpu, event.pid >> 32,
event.pid & 0xFFFFFFFF, time.time() - start_ts,
(" " * (depth - 1)) + direction + event.clazz + "." + event.method))
(" " * (depth - 1)) + direction + \
event.clazz.decode('utf-8', 'replace') + "." + \
event.method.decode('utf-8', 'replace')))

bpf["calls"].open_perf_buffer(print_event)
while 1:
Expand Down

0 comments on commit 215fc84

Please sign in to comment.