mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
perf: net_dropmonitor: Fix symbol-relative addresses
commit 5a1e99dd20 upstream.
The comparison between traced and symbol addresses is backwards: if
the traced address doesn't exactly match a symbol (which we don't
expect it to), we'll show the next symbol and the offset to it,
whereas we should show the previous symbol and the offset from it.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
This commit is contained in:
committed by
Kamal Mostafa
parent
3fa80a92f0
commit
0db87a46a0
@@ -40,9 +40,9 @@ def get_kallsyms_table():
|
||||
|
||||
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():
|
||||
|
||||
Reference in New Issue
Block a user