diff options
Diffstat (limited to 'tools/perf/scripts/python')
| -rwxr-xr-x | tools/perf/scripts/python/net_dropmonitor.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py index 32fcee05c0f6..b5740599aabd 100755 --- a/tools/perf/scripts/python/net_dropmonitor.py +++ b/tools/perf/scripts/python/net_dropmonitor.py | |||
| @@ -15,28 +15,17 @@ kallsyms = [] | |||
| 15 | 15 | ||
| 16 | def get_kallsyms_table(): | 16 | def get_kallsyms_table(): |
| 17 | global kallsyms | 17 | global kallsyms |
| 18 | |||
| 18 | try: | 19 | try: |
| 19 | f = open("/proc/kallsyms", "r") | 20 | f = open("/proc/kallsyms", "r") |
| 20 | linecount = 0 | ||
| 21 | for line in f: | ||
| 22 | linecount = linecount+1 | ||
| 23 | f.seek(0) | ||
| 24 | except: | 21 | except: |
| 25 | return | 22 | return |
| 26 | 23 | ||
| 27 | |||
| 28 | j = 0 | ||
| 29 | for line in f: | 24 | for line in f: |
| 30 | loc = int(line.split()[0], 16) | 25 | loc = int(line.split()[0], 16) |
| 31 | name = line.split()[2] | 26 | name = line.split()[2] |
| 32 | j = j +1 | ||
| 33 | if ((j % 100) == 0): | ||
| 34 | print "\r" + str(j) + "/" + str(linecount), | ||
| 35 | kallsyms.append((loc, name)) | 27 | kallsyms.append((loc, name)) |
| 36 | |||
| 37 | print "\r" + str(j) + "/" + str(linecount) | ||
| 38 | kallsyms.sort() | 28 | kallsyms.sort() |
| 39 | return | ||
| 40 | 29 | ||
| 41 | def get_sym(sloc): | 30 | def get_sym(sloc): |
| 42 | loc = int(sloc) | 31 | loc = int(sloc) |
