dump-trace.py: update after trace.proto relocation
Change-Id: I4f4b9870cdbe9b81338dde76453755700e6fea94
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
# create python bindings before running:
|
||||
# protoc --python_out=. trace.proto
|
||||
|
||||
import trace_pb2
|
||||
import TracePlugin_pb2
|
||||
import sys
|
||||
import struct
|
||||
from gzip import GzipFile
|
||||
@ -12,7 +12,7 @@ if len(sys.argv) != 2:
|
||||
print "Usage:", sys.argv[0], "tracefile.pb"
|
||||
sys.exit(-1)
|
||||
|
||||
trace_event = trace_pb2.Trace_Event()
|
||||
trace_event = TracePlugin_pb2.Trace_Event()
|
||||
|
||||
def open_trace(filename):
|
||||
f = open(filename, "rb")
|
||||
@ -56,7 +56,7 @@ while True:
|
||||
if len(trace_event.trace_ext.stack) > 0:
|
||||
ext += " STACK: " + "".join(["%x"%x for x in trace_event.trace_ext.stack])
|
||||
print "MEM {0} {1:x} width {2:d} IP {3:x} {4}".format(
|
||||
"R" if trace_event.accesstype == trace_pb2.Trace_Event.READ else "W",
|
||||
"R" if trace_event.accesstype == trace_event.READ else "W",
|
||||
trace_event.memaddr, trace_event.width, trace_event.ip, ext)
|
||||
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user