20 threads = perf.thread_map()
21 evsel = perf.evsel(task = 1, comm = 1, mmap = 0,
22 wakeup_events = 1, watermark = 1,
24 sample_type = perf.SAMPLE_PERIOD | perf.SAMPLE_TID | perf.SAMPLE_CPU | perf.SAMPLE_TID)
25 evsel.open(cpus = cpus, threads = threads);
26 evlist = perf.evlist(cpus, threads)
30 evlist.poll(timeout = -1)
32 event = evlist.read_on_cpu(cpu)
35 print "cpu: %2d, pid: %4d, tid: %4d" % (event.sample_cpu,
40 if __name__ ==
'__main__':