diff options
Diffstat (limited to 'Documentation/perf_counter/builtin-stat.c')
-rw-r--r-- | Documentation/perf_counter/builtin-stat.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c index 27abe6a2db3b..2357a663b675 100644 --- a/Documentation/perf_counter/builtin-stat.c +++ b/Documentation/perf_counter/builtin-stat.c | |||
@@ -1,20 +1,27 @@ | |||
1 | /* | 1 | /* |
2 | * perf stat: /usr/bin/time -alike performance counter statistics utility | 2 | * builtin-stat.c |
3 | * | ||
4 | * Builtin stat command: Give a precise performance counters summary | ||
5 | * overview about any workload, CPU or specific PID. | ||
6 | * | ||
7 | * Sample output: | ||
3 | 8 | ||
4 | It summarizes the counter events of all tasks (and child tasks), | 9 | $ perf stat ~/hackbench 10 |
5 | covering all CPUs that the command (or workload) executes on. | 10 | Time: 0.104 |
6 | It only counts the per-task events of the workload started, | ||
7 | independent of how many other tasks run on those CPUs. | ||
8 | 11 | ||
9 | Sample output: | 12 | Performance counter stats for '/home/mingo/hackbench': |
10 | 13 | ||
11 | $ perf stat -e 1 -e 3 -e 5 ls -lR /usr/include/ >/dev/null | 14 | 1255.538611 task clock ticks # 10.143 CPU utilization factor |
15 | 54011 context switches # 0.043 M/sec | ||
16 | 385 CPU migrations # 0.000 M/sec | ||
17 | 17755 pagefaults # 0.014 M/sec | ||
18 | 3808323185 CPU cycles # 3033.219 M/sec | ||
19 | 1575111190 instructions # 1254.530 M/sec | ||
20 | 17367895 cache references # 13.833 M/sec | ||
21 | 7674421 cache misses # 6.112 M/sec | ||
12 | 22 | ||
13 | Performance counter stats for 'ls': | 23 | Wall-clock time elapsed: 123.786620 msecs |
14 | 24 | ||
15 | 163516953 instructions | ||
16 | 2295 cache-misses | ||
17 | 2855182 branch-misses | ||
18 | * | 25 | * |
19 | * Copyright (C) 2008, Red Hat Inc, Ingo Molnar <mingo@redhat.com> | 26 | * Copyright (C) 2008, Red Hat Inc, Ingo Molnar <mingo@redhat.com> |
20 | * | 27 | * |