Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 1 | perf-stat(1) |
| 2 | ========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | perf-stat - Run a command and gather performance counter statistics |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | 'perf stat' [-e <EVENT> | --event=EVENT] [-l] [-a] <command> |
Mike Galbraith | 9e096753 | 2009-05-28 16:25:34 +0200 | [diff] [blame] | 12 | 'perf stat' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>] |
Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
| 16 | This command runs a command and gathers performance counter statistics |
| 17 | from it. |
| 18 | |
| 19 | |
| 20 | OPTIONS |
| 21 | ------- |
| 22 | <command>...:: |
| 23 | Any command you can specify in a shell. |
| 24 | |
| 25 | -e:: |
| 26 | --event=:: |
| 27 | 0:0: cpu-cycles |
| 28 | 0:0: cycles |
| 29 | 0:1: instructions |
| 30 | 0:2: cache-references |
| 31 | 0:3: cache-misses |
| 32 | 0:4: branch-instructions |
| 33 | 0:4: branches |
| 34 | 0:5: branch-misses |
| 35 | 0:6: bus-cycles |
| 36 | 1:0: cpu-clock |
| 37 | 1:1: task-clock |
| 38 | 1:2: page-faults |
| 39 | 1:2: faults |
| 40 | 1:5: minor-faults |
| 41 | 1:6: major-faults |
| 42 | 1:3: context-switches |
| 43 | 1:3: cs |
| 44 | 1:4: cpu-migrations |
| 45 | 1:4: migrations |
| 46 | rNNN: raw PMU events (eventsel+umask) |
| 47 | |
| 48 | -a:: |
| 49 | system-wide collection |
| 50 | |
| 51 | -l:: |
| 52 | scale counter values |
| 53 | |
Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 54 | EXAMPLES |
| 55 | -------- |
| 56 | |
| 57 | $ perf stat sleep 1 |
| 58 | |
| 59 | Performance counter stats for 'sleep': |
| 60 | |
| 61 | 0.678356 task clock ticks (msecs) |
| 62 | 7 context switches (events) |
| 63 | 4 CPU migrations (events) |
| 64 | 232 pagefaults (events) |
| 65 | 1810403 CPU cycles (events) |
| 66 | 946759 instructions (events) |
| 67 | 18952 cache references (events) |
| 68 | 4885 cache misses (events) |
| 69 | |
| 70 | Wall-clock time elapsed: 1001.252894 msecs |
| 71 | |
| 72 | SEE ALSO |
| 73 | -------- |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame^] | 74 | linkperf:perf-tops[1] |