Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf: net_dropmonitor: Remove progress indicator

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>

authored by

Ben Hutchings and committed by
David S. Miller
6b75c735 0ce58bae

+1 -12
+1 -12
tools/perf/scripts/python/net_dropmonitor.py
··· 15 15 16 16 def get_kallsyms_table(): 17 17 global kallsyms 18 + 18 19 try: 19 20 f = open("/proc/kallsyms", "r") 20 - linecount = 0 21 - for line in f: 22 - linecount = linecount+1 23 - f.seek(0) 24 21 except: 25 22 return 26 23 27 - 28 - j = 0 29 24 for line in f: 30 25 loc = int(line.split()[0], 16) 31 26 name = line.split()[2] 32 - j = j +1 33 - if ((j % 100) == 0): 34 - print "\r" + str(j) + "/" + str(linecount), 35 27 kallsyms.append((loc, name)) 36 - 37 - print "\r" + str(j) + "/" + str(linecount) 38 28 kallsyms.sort() 39 - return 40 29 41 30 def get_sym(sloc): 42 31 loc = int(sloc)