diff options
author | xingfeng2510 <xingfeng25100@163.com> | 2022-03-13 18:13:57 +0800 |
---|---|---|
committer | yonghong-song <ys114321@gmail.com> | 2022-03-16 00:22:38 -0700 |
commit | 55dcd2ee5a6183c748c0dd553a9400bc7de768a1 (patch) | |
tree | b102ab71f10e049e5a7191f4aed80479989ee279 | |
parent | b2e363d1580878898cde51922fa910a9d1eb8b29 (diff) | |
download | bcc-55dcd2ee5a6183c748c0dd553a9400bc7de768a1.tar.gz |
tools: Fix bytes<->str mixing in python3
-rwxr-xr-x | tools/btrfsdist.py | 2 | ||||
-rwxr-xr-x | tools/hardirqs.py | 2 | ||||
-rwxr-xr-x | tools/xfsdist.py | 2 | ||||
-rwxr-xr-x | tools/zfsdist.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tools/btrfsdist.py b/tools/btrfsdist.py index 72ea304a..a9bf6e49 100755 --- a/tools/btrfsdist.py +++ b/tools/btrfsdist.py @@ -231,7 +231,7 @@ while (1): if args.interval and (not args.notimestamp): print(strftime("%H:%M:%S:")) - dist.print_log2_hist(label, "operation") + dist.print_log2_hist(label, "operation", section_print_fn=bytes.decode) dist.clear() countdown -= 1 diff --git a/tools/hardirqs.py b/tools/hardirqs.py index 4e373d9c..239d8139 100755 --- a/tools/hardirqs.py +++ b/tools/hardirqs.py @@ -241,7 +241,7 @@ while (1): print("%-8s\n" % strftime("%H:%M:%S"), end="") if args.dist: - dist.print_log2_hist(label, "hardirq") + dist.print_log2_hist(label, "hardirq", section_print_fn=bytes.decode) else: print("%-26s %11s" % ("HARDIRQ", "TOTAL_" + label)) for k, v in sorted(dist.items(), key=lambda dist: dist[1].value): diff --git a/tools/xfsdist.py b/tools/xfsdist.py index 58f73afd..163c2207 100755 --- a/tools/xfsdist.py +++ b/tools/xfsdist.py @@ -169,7 +169,7 @@ while (1): if args.interval and (not args.notimestamp): print(strftime("%H:%M:%S:")) - dist.print_log2_hist(label, "operation") + dist.print_log2_hist(label, "operation", section_print_fn=bytes.decode) dist.clear() countdown -= 1 diff --git a/tools/zfsdist.py b/tools/zfsdist.py index a30671da..f9c229c7 100755 --- a/tools/zfsdist.py +++ b/tools/zfsdist.py @@ -183,7 +183,7 @@ while (1): if args.interval and (not args.notimestamp): print(strftime("%H:%M:%S:")) - dist.print_log2_hist(label, "operation") + dist.print_log2_hist(label, "operation", section_print_fn=bytes.decode) dist.clear() countdown -= 1 |