7 sys.path.append(os.environ[
'PERF_EXEC_PATH'] + \
8 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
10 from perf_trace_context
import *
21 f = open(
"/proc/kallsyms",
"r") 26 loc = int(line.split()[0], 16)
27 name = line.split()[2]
28 kallsyms.append((loc, name))
36 start, end = -1, len(kallsyms)
37 while end != start + 1:
38 pivot = (start + end) // 2
39 if loc < kallsyms[pivot][0]:
47 symloc, name = kallsyms[start]
48 return (name, loc - symloc)
53 print "%25s %25s %25s" % (
"LOCATION",
"OFFSET",
"COUNT")
54 for i
in drop_log.keys():
58 print "%25s %25s %25s" % (sym, off, drop_log[i])
62 print "Starting trace (Ctrl-C to dump results)" 65 print "Gathering kallsyms data" 70 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
71 skbaddr, location, protocol):
72 slocation =
str(location)
74 drop_log[slocation] = drop_log[slocation] + 1
76 drop_log[slocation] = 1
static int str(yyscan_t scanner, int token)
def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr, location, protocol)