blob: fa413ac914f54ba74e4663f77a8744acbfe4307c [file] [log] [blame]
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -02001perf-diff(1)
Arnaldo Carvalho de Melo4778e0e2010-05-05 11:23:27 -03002============
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -02003
4NAME
5----
Ingo Molnard30531c2009-12-15 10:24:08 +01006perf-diff - Read two perf.data files and display the differential profile
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -02007
8SYNOPSIS
9--------
10[verse]
11'perf diff' [oldfile] [newfile]
12
13DESCRIPTION
14-----------
Ingo Molnard30531c2009-12-15 10:24:08 +010015This command displays the performance difference amongst two perf.data files
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -020016captured via perf record.
17
18If no parameters are passed it will assume perf.data.old and perf.data.
19
Jiri Olsa863e4512012-09-06 17:46:55 +020020The differential profile is displayed only for events matching both
21specified perf.data files.
22
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -020023OPTIONS
24-------
Shawn Bohrer5ea4f852010-11-30 19:57:12 -060025-M::
26--displacement::
27 Show position displacement relative to baseline.
28
29-D::
30--dump-raw-trace::
31 Dump raw trace in ASCII.
32
33-m::
34--modules::
35 Load module symbols. WARNING: use only with -k and LIVE kernel
36
Arnaldo Carvalho de Meloc351c282009-12-16 13:49:27 -020037-d::
38--dsos=::
39 Only consider symbols in these dsos. CSV that understands
40 file://filename entries.
41
42-C::
43--comms=::
44 Only consider symbols in these comms. CSV that understands
45 file://filename entries.
46
47-S::
48--symbols=::
49 Only consider these symbols. CSV that understands
50 file://filename entries.
51
52-s::
53--sort=::
54 Sort by key(s): pid, comm, dso, symbol.
55
56-t::
57--field-separator=::
58
59 Use a special separator character and don't pad with spaces, replacing
Shawn Bohrer5ea4f852010-11-30 19:57:12 -060060 all occurrences of this separator in symbol names (and other output)
Arnaldo Carvalho de Meloc351c282009-12-16 13:49:27 -020061 with a '.' character, that thus it's the only non valid separator.
62
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -020063-v::
64--verbose::
Ingo Molnard30531c2009-12-15 10:24:08 +010065 Be verbose, for instance, show the raw counts in addition to the
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -020066 diff.
Arnaldo Carvalho de Melocdccc692009-12-15 11:01:22 -020067
Shawn Bohrer5ea4f852010-11-30 19:57:12 -060068-f::
69--force::
70 Don't complain, do it.
71
David Ahernec5761e2010-12-09 13:27:07 -070072--symfs=<directory>::
73 Look for files with symbols relative to this directory.
Shawn Bohrer5ea4f852010-11-30 19:57:12 -060074
Jiri Olsaa06d1432012-10-05 16:44:40 +020075-b::
76--baseline-only::
77 Show only items with match in baseline.
78
Jiri Olsa7aaf6b32012-10-05 16:44:41 +020079-c::
80--compute::
Jiri Olsa81d5f952012-10-05 16:44:43 +020081 Differential computation selection - delta,ratio,wdiff (default is delta).
Jiri Olsa96c47f12012-10-05 16:44:42 +020082 If '+' is specified as a first character, the output is sorted based
83 on the computation results.
Jiri Olsa7aaf6b32012-10-05 16:44:41 +020084 See COMPARISON METHODS section for more info.
85
86COMPARISON METHODS
87------------------
88delta
89~~~~~
90If specified the 'Delta' column is displayed with value 'd' computed as:
91
92 d = A->period_percent - B->period_percent
93
94with:
95 - A/B being matching hist entry from first/second file specified
96 (or perf.data/perf.data.old) respectively.
97
98 - period_percent being the % of the hist entry period value within
99 single data file
100
101ratio
102~~~~~
103If specified the 'Ratio' column is displayed with value 'r' computed as:
104
105 r = A->period / B->period
106
107with:
108 - A/B being matching hist entry from first/second file specified
109 (or perf.data/perf.data.old) respectively.
110
111 - period being the hist entry period value
112
Jiri Olsa81d5f952012-10-05 16:44:43 +0200113wdiff
114~~~~~
115If specified the 'Weighted diff' column is displayed with value 'd' computed as:
116
117 d = B->period * WEIGHT-A - A->period * WEIGHT-B
118
119 - A/B being matching hist entry from first/second file specified
120 (or perf.data/perf.data.old) respectively.
121
122 - period being the hist entry period value
123
124 - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option
125 behind ':' separator like '-c wdiff:1,2'.
Jiri Olsa7aaf6b32012-10-05 16:44:41 +0200126
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -0200127SEE ALSO
128--------
129linkperf:perf-record[1]