linux/tools/perf
Frederic Weisbecker cdce9d738b perf sched: Add sched latency profiling
Add the -l --latency option that reports statistics about the
scheduler latencies.

For now, the latencies are measured in the following sequence
scope:

- task A is sleeping (D or S state)
- task B wakes up A
         ^
         |
         |

   latency timeframe

         |
         |
         v
- task A is scheduled in

Start by recording every scheduler events:

	perf record -e sched:*

and then fetch the results:

	perf sched -l

 Tasks                     count          total              avg            max

migration/0                  2             39849            19924           28826
ksoftirqd/0                  7            756383           108054          373014
migration/1                  5             45391             9078           10452
ksoftirqd/1                  2            399055           199527          359130
events/0                     8           4780110           597513         4500250
events/1                     9           6353057           705895         2986012
kblockd/0                   42          37805097           900121         5077684

The snapshot are in nanoseconds.

- Count: number of snapshots taken for the given task
- Total: total latencies in nanosec
- Avg  : average of latency between wake up and sched in
- Max  : max snapshot latency

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-13 10:22:43 +02:00
..
Documentation perf: Add 'perf sched' tool 2009-09-13 10:22:36 +02:00
util perf sched: Fix bad event alignment 2009-09-13 10:22:41 +02:00
.gitignore perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
builtin-annotate.c perf tools: Librarize idle thread registration 2009-08-31 10:04:48 +02:00
builtin-help.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-record.c perf trace: Sample timestamps as well 2009-09-03 15:45:49 +02:00
builtin-report.c perf tools: Librarize idle thread registration 2009-08-31 10:04:48 +02:00
builtin-sched.c perf sched: Add sched latency profiling 2009-09-13 10:22:43 +02:00
builtin-stat.c perf stat: Clean up statistics calculations a bit more 2009-09-04 20:27:26 +02:00
builtin-top.c perf top: Show RIP only in verbose mode 2009-08-26 20:21:45 +02:00
builtin-trace.c perf trace: Fix parsing of perf.data 2009-09-03 16:19:57 +02:00
builtin.h perf: Add 'perf sched' tool 2009-09-13 10:22:36 +02:00
command-list.txt perf: Add 'perf sched' tool 2009-09-13 10:22:36 +02:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf_counter: Start documenting HAVE_PERF_COUNTERS requirements 2009-06-12 19:37:30 +02:00
Makefile perf: Add 'perf sched' tool 2009-09-13 10:22:36 +02:00
perf.c perf: Add 'perf sched' tool 2009-09-13 10:22:36 +02:00
perf.h perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00