]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
perf: net_dropmonitor: Remove progress indicator
authorBen Hutchings <ben@decadent.org.uk>
Mon, 20 May 2013 14:45:57 +0000 (14:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 May 2013 22:10:11 +0000 (15:10 -0700)
We can read /proc/kallsyms in a fraction of a second, so why waste
a further fraction of a second showing progress?

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/perf/scripts/python/net_dropmonitor.py

index 32fcee05c0f69c21f62397ee36695ca96b27c152..b5740599aabd38ee1eebdbc2ce3f66b58a0437a6 100755 (executable)
@@ -15,28 +15,17 @@ kallsyms = []
 
 def get_kallsyms_table():
        global kallsyms
+
        try:
                f = open("/proc/kallsyms", "r")
-               linecount = 0
-               for line in f:
-                       linecount = linecount+1
-               f.seek(0)
        except:
                return
 
-
-       j = 0
        for line in f:
                loc = int(line.split()[0], 16)
                name = line.split()[2]
-               j = j +1
-               if ((j % 100) == 0):
-                       print "\r" + str(j) + "/" + str(linecount),
                kallsyms.append((loc, name))
-
-       print "\r" + str(j) + "/" + str(linecount)
        kallsyms.sort()
-       return
 
 def get_sym(sloc):
        loc = int(sloc)