Skip to content

Commit

Permalink
perf: net_dropmonitor: Remove progress indicator
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
bwhacks authored and davem330 committed May 22, 2013
1 parent 0ce58ba commit 6b75c73
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tools/perf/scripts/python/net_dropmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,17 @@

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)
Expand Down

0 comments on commit 6b75c73

Please sign in to comment.