diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-14 17:09:31 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-15 02:50:29 -0500 |
commit | 86a9eee047ba09a714c3b8e27c9df2bbf715393a (patch) | |
tree | 09c096e92b583f42480ac1dbe7dfa45eae1a7f31 /tools/perf/Documentation | |
parent | b38d34645cc52136b6c99623fef7ded26742e573 (diff) |
perf diff: Introduce tool to show performance difference
I guess it is enough to show some examples:
[root@doppio linux-2.6-tip]# rm -f perf.data*
[root@doppio linux-2.6-tip]# ls -la perf.data*
ls: cannot access perf.data*: No such file or directory
[root@doppio linux-2.6-tip]# perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699 samples) ]
[root@doppio linux-2.6-tip]# ls -la perf.data*
-rw------- 1 root root 74440 2009-12-14 20:03 perf.data
[root@doppio linux-2.6-tip]# perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2692 samples) ]
[root@doppio linux-2.6-tip]# ls -la perf.data*
-rw------- 1 root root 74280 2009-12-14 20:03 perf.data
-rw------- 1 root root 74440 2009-12-14 20:03 perf.data.old
[root@doppio linux-2.6-tip]# perf diff | head -5
1 -34994580 /lib64/libc-2.10.1.so _IO_vfprintf_internal
2 -15307806 [kernel.kallsyms] __kmalloc
3 +1 +3665941 /lib64/libc-2.10.1.so __GI_memmove
4 +4 +23508995 /lib64/libc-2.10.1.so _int_malloc
5 +7 +38538813 [kernel.kallsyms] __d_lookup
[root@doppio linux-2.6-tip]# perf diff -p | head -5
1 +1.00% /lib64/libc-2.10.1.so _IO_vfprintf_internal
2 [kernel.kallsyms] __kmalloc
3 +1 /lib64/libc-2.10.1.so __GI_memmove
4 +4 /lib64/libc-2.10.1.so _int_malloc
5 +7 -1.00% [kernel.kallsyms] __d_lookup
[root@doppio linux-2.6-tip]# perf diff -v | head -5
1 361449551 326454971 -34994580 /lib64/libc-2.10.1.so _IO_vfprintf_internal
2 151009241 135701435 -15307806 [kernel.kallsyms] __kmalloc
3 +1 101805328 105471269 +3665941 /lib64/libc-2.10.1.so __GI_memmove
4 +4 78041440 101550435 +23508995 /lib64/libc-2.10.1.so _int_malloc
5 +7 59536172 98074985 +38538813 [kernel.kallsyms] __d_lookup
[root@doppio linux-2.6-tip]# perf diff -vp | head -5
1 9.00% 8.00% +1.00% /lib64/libc-2.10.1.so _IO_vfprintf_internal
2 3.00% 3.00% [kernel.kallsyms] __kmalloc
3 +1 2.00% 2.00% /lib64/libc-2.10.1.so __GI_memmove
4 +4 2.00% 2.00% /lib64/libc-2.10.1.so _int_malloc
5 +7 1.00% 2.00% -1.00% [kernel.kallsyms] __d_lookup
[root@doppio linux-2.6-tip]#
This should be enough for diffs where the system is non
volatile, i.e. when one doesn't updates binaries.
For volatile environments, stay tuned for the next perf tool
feature: a buildid cache populated by 'perf record', managed by
'perf buildid-cache' a-la ccache, and used by all the report
tools.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
LKML-Reference: <1260828571-3613-3-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Documentation')
-rw-r--r-- | tools/perf/Documentation/perf-diff.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt new file mode 100644 index 000000000000..bd1ee55cef6a --- /dev/null +++ b/tools/perf/Documentation/perf-diff.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | perf-diff(1) | ||
2 | ============== | ||
3 | |||
4 | NAME | ||
5 | ---- | ||
6 | perf-diff - Read perf.data (created by perf record) and display the profile | ||
7 | |||
8 | SYNOPSIS | ||
9 | -------- | ||
10 | [verse] | ||
11 | 'perf diff' [oldfile] [newfile] | ||
12 | |||
13 | DESCRIPTION | ||
14 | ----------- | ||
15 | This command displays the performance difference among two perf.data files | ||
16 | captured via perf record. | ||
17 | |||
18 | If no parameters are passed it will assume perf.data.old and perf.data. | ||
19 | |||
20 | OPTIONS | ||
21 | ------- | ||
22 | -p:: | ||
23 | --percentage:: | ||
24 | Show percentages instead of raw counters | ||
25 | -v:: | ||
26 | --verbose:: | ||
27 | Be verbose, for instance, show the raw counters in addition to the | ||
28 | diff. | ||
29 | SEE ALSO | ||
30 | -------- | ||
31 | linkperf:perf-record[1] | ||