git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: net_dropmonitor: Fix symbol-relative addresses
[pandora-kernel.git]
/
tools
/
perf
/
scripts
/
python
/
net_dropmonitor.py
diff --git
a/tools/perf/scripts/python/net_dropmonitor.py
b/tools/perf/scripts/python/net_dropmonitor.py
index
a4ffc95
..
4c11605
100755
(executable)
--- a/
tools/perf/scripts/python/net_dropmonitor.py
+++ b/
tools/perf/scripts/python/net_dropmonitor.py
@@
-40,9
+40,9
@@
def get_kallsyms_table():
def get_sym(sloc):
loc = int(sloc)
def get_sym(sloc):
loc = int(sloc)
- for i in kallsyms:
- if
(i['loc'] >= loc)
:
- return (i['name'],
i['loc']-loc
)
+ for i in kallsyms
[::-1]
:
+ if
loc >= i['loc']
:
+ return (i['name'],
loc - i['loc']
)
return (None, 0)
def print_drop_table():
return (None, 0)
def print_drop_table():
@@
-64,7
+64,7
@@
def trace_end():
# called from perf, when it finds a correspoinding event
def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm,
# called from perf, when it finds a correspoinding event
def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm,
-
skbaddr, protocol, location
):
+
skbaddr, location, protocol
):
slocation = str(location)
try:
drop_log[slocation] = drop_log[slocation] + 1
slocation = str(location)
try:
drop_log[slocation] = drop_log[slocation] + 1