From bf9e187637ca3d85cee7407e3af93995868cc87c Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 2 Jun 2009 23:37:05 +0200 Subject: perf_counter tools: Make source code headers more coherent The perf commands had different ways of describing themselves, introduce a coherent command-file-header format taken from the Git project. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar --- Documentation/perf_counter/builtin-stat.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'Documentation/perf_counter/builtin-stat.c') 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 @@ /* - * perf stat: /usr/bin/time -alike performance counter statistics utility + * builtin-stat.c + * + * Builtin stat command: Give a precise performance counters summary + * overview about any workload, CPU or specific PID. + * + * Sample output: - It summarizes the counter events of all tasks (and child tasks), - covering all CPUs that the command (or workload) executes on. - It only counts the per-task events of the workload started, - independent of how many other tasks run on those CPUs. + $ perf stat ~/hackbench 10 + Time: 0.104 - Sample output: + Performance counter stats for '/home/mingo/hackbench': - $ perf stat -e 1 -e 3 -e 5 ls -lR /usr/include/ >/dev/null + 1255.538611 task clock ticks # 10.143 CPU utilization factor + 54011 context switches # 0.043 M/sec + 385 CPU migrations # 0.000 M/sec + 17755 pagefaults # 0.014 M/sec + 3808323185 CPU cycles # 3033.219 M/sec + 1575111190 instructions # 1254.530 M/sec + 17367895 cache references # 13.833 M/sec + 7674421 cache misses # 6.112 M/sec - Performance counter stats for 'ls': + Wall-clock time elapsed: 123.786620 msecs - 163516953 instructions - 2295 cache-misses - 2855182 branch-misses * * Copyright (C) 2008, Red Hat Inc, Ingo Molnar * -- cgit v1.2.3