aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-02 17:37:05 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-02 17:37:05 -0400
commitbf9e187637ca3d85cee7407e3af93995868cc87c (patch)
treec2ea1b5fad7f75082efb93abb7fa447940b7cb69 /Documentation/perf_counter
parent0a520c63e1625b92ef775da40192e1542910e7f6 (diff)
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 <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter')
-rw-r--r--Documentation/perf_counter/builtin-record.c11
-rw-r--r--Documentation/perf_counter/builtin-report.c10
-rw-r--r--Documentation/perf_counter/builtin-stat.c29
-rw-r--r--Documentation/perf_counter/builtin-top.c60
-rw-r--r--Documentation/perf_counter/perf.c9
5 files changed, 62 insertions, 57 deletions
diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c
index 8feb1192e09e..2741b3561bb7 100644
--- a/Documentation/perf_counter/builtin-record.c
+++ b/Documentation/perf_counter/builtin-record.c
@@ -1,9 +1,14 @@
1/* 1/*
2 * perf record: Record the profile of a workload (or a CPU, or a PID) into 2 * builtin-record.c
3 * the perf.data output file - for later analysis via perf report. 3 *
4 * Builtin record command: Record the profile of a workload
5 * (or a CPU, or a PID) into the perf.data output file - for
6 * later analysis via perf report.
4 */ 7 */
5#include "perf.h"
6#include "builtin.h" 8#include "builtin.h"
9
10#include "perf.h"
11
7#include "util/util.h" 12#include "util/util.h"
8#include "util/parse-options.h" 13#include "util/parse-options.h"
9#include "util/parse-events.h" 14#include "util/parse-events.h"
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c
index 270e986c2d42..9da990fba4a5 100644
--- a/Documentation/perf_counter/builtin-report.c
+++ b/Documentation/perf_counter/builtin-report.c
@@ -1,6 +1,14 @@
1#include "util/util.h" 1/*
2 * builtin-report.c
3 *
4 * Builtin report command: Analyze the perf.data input file,
5 * look up and read DSOs and symbol information and display
6 * a histogram of results, along various sorting keys.
7 */
2#include "builtin.h" 8#include "builtin.h"
3 9
10#include "util/util.h"
11
4#include "util/list.h" 12#include "util/list.h"
5#include "util/cache.h" 13#include "util/cache.h"
6#include "util/rbtree.h" 14#include "util/rbtree.h"
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 *
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index 5029d8e6cd9c..a63935276cac 100644
--- a/Documentation/perf_counter/builtin-top.c
+++ b/Documentation/perf_counter/builtin-top.c
@@ -1,49 +1,25 @@
1/* 1/*
2 * kerneltop.c: show top kernel functions - performance counters showcase 2 * builtin-top.c
3 3 *
4 Build with: 4 * Builtin top command: Display a continuously updated profile of
5 5 * any workload, CPU or specific PID.
6 make -C Documentation/perf_counter/ 6 *
7 7 * Copyright (C) 2008, Red Hat Inc, Ingo Molnar <mingo@redhat.com>
8 Sample output: 8 *
9 9 * Improvements and fixes by:
10------------------------------------------------------------------------------ 10 *
11 KernelTop: 2669 irqs/sec [cache-misses/cache-refs], (all, cpu: 2) 11 * Arjan van de Ven <arjan@linux.intel.com>
12------------------------------------------------------------------------------ 12 * Yanmin Zhang <yanmin.zhang@intel.com>
13 13 * Wu Fengguang <fengguang.wu@intel.com>
14 weight RIP kernel function 14 * Mike Galbraith <efault@gmx.de>
15 ______ ________________ _______________ 15 * Paul Mackerras <paulus@samba.org>
16 16 *
17 35.20 - ffffffff804ce74b : skb_copy_and_csum_dev 17 * Released under the GPL v2. (and only v2, not any later version)
18 33.00 - ffffffff804cb740 : sock_alloc_send_skb
19 31.26 - ffffffff804ce808 : skb_push
20 22.43 - ffffffff80510004 : tcp_established_options
21 19.00 - ffffffff8027d250 : find_get_page
22 15.76 - ffffffff804e4fc9 : eth_type_trans
23 15.20 - ffffffff804d8baa : dst_release
24 14.86 - ffffffff804cf5d8 : skb_release_head_state
25 14.00 - ffffffff802217d5 : read_hpet
26 12.00 - ffffffff804ffb7f : __ip_local_out
27 11.97 - ffffffff804fc0c8 : ip_local_deliver_finish
28 8.54 - ffffffff805001a3 : ip_queue_xmit
29 */ 18 */
30 19#include "builtin.h"
31 /*
32 * Copyright (C) 2008, Red Hat Inc, Ingo Molnar <mingo@redhat.com>
33 *
34 * Improvements and fixes by:
35 *
36 * Arjan van de Ven <arjan@linux.intel.com>
37 * Yanmin Zhang <yanmin.zhang@intel.com>
38 * Wu Fengguang <fengguang.wu@intel.com>
39 * Mike Galbraith <efault@gmx.de>
40 * Paul Mackerras <paulus@samba.org>
41 *
42 * Released under the GPL v2. (and only v2, not any later version)
43 */
44 20
45#include "perf.h" 21#include "perf.h"
46#include "builtin.h" 22
47#include "util/symbol.h" 23#include "util/symbol.h"
48#include "util/util.h" 24#include "util/util.h"
49#include "util/rbtree.h" 25#include "util/rbtree.h"
diff --git a/Documentation/perf_counter/perf.c b/Documentation/perf_counter/perf.c
index e8a85842b493..ec7edb7fbe29 100644
--- a/Documentation/perf_counter/perf.c
+++ b/Documentation/perf_counter/perf.c
@@ -1,4 +1,13 @@
1/*
2 * perf.c
3 *
4 * Performance analysis utility.
5 *
6 * This is the main hub from which the sub-commands (perf stat,
7 * perf top, perf record, perf report, etc.) are started.
8 */
1#include "builtin.h" 9#include "builtin.h"
10
2#include "util/exec_cmd.h" 11#include "util/exec_cmd.h"
3#include "util/cache.h" 12#include "util/cache.h"
4#include "util/quote.h" 13#include "util/quote.h"