Lines Matching full:trace
55 This will produce a binary trace file (perf.data) that %prog can analyse.
77 $ %prog --log=foo.log --snapshot-log=snap-foo.log --trace=foo.data --snapshot
502 """Descriptor of a structure in the binary trace log."""
520 def Read(self, trace, offset):
521 return self.ctype.from_buffer(trace, offset)
622 """Perf (linux-2.6/tools/perf) trace file reader."""
628 self.trace = mmap.mmap(self.trace_file.fileno(), 0, mmap.MAP_PRIVATE)
629 self.trace_header = TRACE_HEADER_DESC.Read(self.trace, 0)
631 print >>sys.stderr, "Warning: unsupported trace header magic"
634 assert self.limit <= self.trace.size(), \
635 "Trace data limit exceeds trace file size"
638 "No perf event attributes found in the trace"
639 perf_event_attr = PERF_EVENT_ATTR_DESC.Read(self.trace,
653 header = PERF_EVENT_HEADER_DESC.Read(self.trace, self.offset)
658 mmap_info = PERF_MMAP_EVENT_BODY_DESC.Read(self.trace,
661 filename = self.trace[offset + self.header_size + ctypes.sizeof(mmap_info):
667 sample = self.sample_event_body_desc.Read(self.trace,
675 self.ip_struct.from_buffer(self.trace, offset).value)
680 self.trace.close()
861 parser.add_option("--trace",
863 help="perf trace file name [default: %default]")
904 print "Perf trace file: %s" % options.trace
941 # Process the code and trace logs.
944 trace_reader = TraceReader(options.trace)
995 print "%10d total trace events" % events