6 sys.path.append(os.environ[
'PERF_EXEC_PATH'] + \
7 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
9 from perf_trace_context
import *
19 f =
open(
"/proc/kallsyms",
"r")
22 linecount = linecount+1
30 loc =
int(line.split()[0], 16)
31 name = line.split()[2]
34 print "\r" +
str(j) +
"/" +
str(linecount),
35 kallsyms.append({
'loc': loc,
'name' : name})
37 print "\r" +
str(j) +
"/" +
str(linecount)
45 return (i[
'name'], i[
'loc']-loc)
49 print "%25s %25s %25s" % (
"LOCATION",
"OFFSET",
"COUNT")
50 for i
in drop_log.keys():
54 print "%25s %25s %25s" % (sym, off, drop_log[i])
58 print "Starting trace (Ctrl-C to dump results)"
61 print "Gathering kallsyms data"
67 skbaddr, protocol, location):
68 slocation =
str(location)
70 drop_log[slocation] = drop_log[slocation] + 1
72 drop_log[slocation] = 1