blob: a67d0e3b7d0d716a1e711a1c4086caf9b452cf4f [file] [log] [blame]
Ingo Molnar1d8c8b22009-04-20 15:52:29 +02001perf-stat(1)
2==========
3
4NAME
5----
6perf-stat - Run a command and gather performance counter statistics
7
8SYNOPSIS
9--------
10[verse]
11'perf stat' [-e <EVENT> | --event=EVENT] [-l] [-a] <command>
Mike Galbraith9e0967532009-05-28 16:25:34 +020012'perf stat' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>]
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020013
14DESCRIPTION
15-----------
16This command runs a command and gathers performance counter statistics
17from it.
18
19
20OPTIONS
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 Molnar1d8c8b22009-04-20 15:52:29 +020054EXAMPLES
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
72SEE ALSO
73--------
Ingo Molnarc1c23652009-05-30 12:38:51 +020074linkperf:perf-tops[1]