aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/python/twatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/python/twatch.py')
-rwxr-xr-xtools/perf/python/twatch.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/python/twatch.py b/tools/perf/python/twatch.py
index 2225162ee1fc..b9d508336ae6 100755
--- a/tools/perf/python/twatch.py
+++ b/tools/perf/python/twatch.py
@@ -18,10 +18,20 @@ import perf
18def main(): 18def main():
19 cpus = perf.cpu_map() 19 cpus = perf.cpu_map()
20 threads = perf.thread_map() 20 threads = perf.thread_map()
21 evsel = perf.evsel(task = 1, comm = 1, mmap = 0, 21 evsel = perf.evsel(type = perf.TYPE_SOFTWARE,
22 config = perf.COUNT_SW_DUMMY,
23 task = 1, comm = 1, mmap = 0, freq = 0,
22 wakeup_events = 1, watermark = 1, 24 wakeup_events = 1, watermark = 1,
23 sample_id_all = 1, 25 sample_id_all = 1,
24 sample_type = perf.SAMPLE_PERIOD | perf.SAMPLE_TID | perf.SAMPLE_CPU) 26 sample_type = perf.SAMPLE_PERIOD | perf.SAMPLE_TID | perf.SAMPLE_CPU)
27
28 """What we want are just the PERF_RECORD_ lifetime events for threads,
29 using the default, PERF_TYPE_HARDWARE + PERF_COUNT_HW_CYCLES & freq=1
30 (the default), makes perf reenable irq_vectors:local_timer_entry, when
31 disabling nohz, not good for some use cases where all we want is to get
32 threads comes and goes... So use (perf.TYPE_SOFTWARE, perf_COUNT_SW_DUMMY,
33 freq=0) instead."""
34
25 evsel.open(cpus = cpus, threads = threads); 35 evsel.open(cpus = cpus, threads = threads);
26 evlist = perf.evlist(cpus, threads) 36 evlist = perf.evlist(cpus, threads)
27 evlist.add(evsel) 37 evlist.add(evsel)