fix pep8 lint errors in the rest of the tools
no functional changes
Signed-off-by: Alexei Starovoitov <ast@fb.com>
diff --git a/tools/vfscount b/tools/vfscount
index d669862..bc0f544 100755
--- a/tools/vfscount
+++ b/tools/vfscount
@@ -1,21 +1,22 @@
#!/usr/bin/python
+# @lint-avoid-python-3-compatibility-imports
#
-# vfscount Count VFS calls ("vfs_*").
-# For Linux, uses BCC, eBPF. See .c file.
+# vfscount Count VFS calls ("vfs_*").
+# For Linux, uses BCC, eBPF. See .c file.
#
# Written as a basic example of counting functions.
#
# Copyright (c) 2015 Brendan Gregg.
# Licensed under the Apache License, Version 2.0 (the "License")
#
-# 14-Aug-2015 Brendan Gregg Created this.
+# 14-Aug-2015 Brendan Gregg Created this.
from __future__ import print_function
from bcc import BPF
from time import sleep
# load BPF program
-b = BPF(src_file = "vfscount.c")
+b = BPF(src_file="vfscount.c")
b.attach_kprobe(event_re="^vfs_.*", fn_name="do_count")
# header
@@ -23,11 +24,11 @@
# output
try:
- sleep(99999999)
+ sleep(99999999)
except KeyboardInterrupt:
- pass
+ pass
print("\n%-16s %-26s %8s" % ("ADDR", "FUNC", "COUNT"))
counts = b.get_table("counts")
for k, v in sorted(counts.items(), key=lambda counts: counts[1].value):
- print("%-16x %-26s %8d" % (k.ip, b.ksym(k.ip), v.value))
+ print("%-16x %-26s %8d" % (k.ip, b.ksym(k.ip), v.value))