Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a1e99dd authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

perf: net_dropmonitor: Fix symbol-relative addresses



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.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 140c3c6a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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():