aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxingfeng2510 <xingfeng25100@163.com>2022-03-13 18:13:57 +0800
committeryonghong-song <ys114321@gmail.com>2022-03-16 00:22:38 -0700
commit55dcd2ee5a6183c748c0dd553a9400bc7de768a1 (patch)
treeb102ab71f10e049e5a7191f4aed80479989ee279
parentb2e363d1580878898cde51922fa910a9d1eb8b29 (diff)
downloadbcc-55dcd2ee5a6183c748c0dd553a9400bc7de768a1.tar.gz
tools: Fix bytes<->str mixing in python3
-rwxr-xr-xtools/btrfsdist.py2
-rwxr-xr-xtools/hardirqs.py2
-rwxr-xr-xtools/xfsdist.py2
-rwxr-xr-xtools/zfsdist.py2
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