blob: a340e7be83dddd71d7b393848ef87ca5474fb2f6 [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
Ingo Molnar20c84e92009-06-04 16:33:00 +020025
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020026-e::
27--event=::
28 0:0: cpu-cycles
29 0:0: cycles
30 0:1: instructions
31 0:2: cache-references
32 0:3: cache-misses
33 0:4: branch-instructions
34 0:4: branches
35 0:5: branch-misses
36 0:6: bus-cycles
37 1:0: cpu-clock
38 1:1: task-clock
39 1:2: page-faults
40 1:2: faults
41 1:5: minor-faults
42 1:6: major-faults
43 1:3: context-switches
44 1:3: cs
45 1:4: cpu-migrations
46 1:4: migrations
47 rNNN: raw PMU events (eventsel+umask)
48
Ingo Molnar20c84e92009-06-04 16:33:00 +020049-i::
50--inherit::
51 child tasks inherit counters
52-p::
53--pid=<pid>::
54 stat events on existing pid
55
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020056-a::
57 system-wide collection
58
59-l::
60 scale counter values
61
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020062EXAMPLES
63--------
64
Ingo Molnar20c84e92009-06-04 16:33:00 +020065$ perf stat -- make -j
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020066
Ingo Molnar20c84e92009-06-04 16:33:00 +020067 Performance counter stats for 'make -j':
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020068
Ingo Molnar20c84e92009-06-04 16:33:00 +020069 8117.370256 task clock ticks # 11.281 CPU utilization factor
70 678 context switches # 0.000 M/sec
71 133 CPU migrations # 0.000 M/sec
72 235724 pagefaults # 0.029 M/sec
73 24821162526 CPU cycles # 3057.784 M/sec
74 18687303457 instructions # 2302.138 M/sec
75 172158895 cache references # 21.209 M/sec
76 27075259 cache misses # 3.335 M/sec
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020077
Ingo Molnar20c84e92009-06-04 16:33:00 +020078 Wall-clock time elapsed: 719.554352 msecs
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020079
80SEE ALSO
81--------
Ingo Molnarc1c23652009-05-30 12:38:51 +020082linkperf:perf-tops[1]