Lines Matching refs: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
503 """Descriptor of a structure in the binary trace log."""
521 def Read(self, trace, offset):
522 return self.ctype.from_buffer(trace, offset)
638 """Perf (linux-2.6/tools/perf) trace file reader."""
644 self.trace = mmap.mmap(self.trace_file.fileno(), 0, mmap.MAP_PRIVATE)
645 self.trace_header = TRACE_HEADER_DESC.Read(self.trace, 0)
647 print >>sys.stderr, "Warning: unsupported trace header magic"
650 assert self.limit <= self.trace.size(), \
651 "Trace data limit exceeds trace file size"
654 "No perf event attributes found in the trace"
655 perf_event_attr = PERF_EVENT_ATTR_DESC.Read(self.trace,
669 header = PERF_EVENT_HEADER_DESC.Read(self.trace, self.offset)
674 mmap_info = PERF_MMAP_EVENT_BODY_DESC.Read(self.trace,
677 filename = self.trace[offset + self.header_size + ctypes.sizeof(mmap_info):
683 mmap_info = PERF_MMAP2_EVENT_BODY_DESC.Read(self.trace,
686 filename = self.trace[offset + self.header_size + ctypes.sizeof(mmap_info):
692 sample = self.sample_event_body_desc.Read(self.trace,
700 self.ip_struct.from_buffer(self.trace, offset).value)
705 self.trace.close()
903 parser.add_option("--trace",
905 help="perf trace file name [default: %default]")
946 print "Perf trace file: %s" % options.trace
983 trace logs.
986 trace_reader = TraceReader(options.trace)
1045 print "%10d total trace events" % events