blob: 194f37d635dfa3e543f21a37807f6be61e9e91bc [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
Jiri Olsa61949b22012-10-05 16:44:44 +020086-p::
87--period::
88 Show period values for both compared hist entries.
89
Jiri Olsaed279da2012-10-05 16:44:45 +020090-F::
91--formula::
92 Show formula for given computation.
93
Jiri Olsa7aaf6b32012-10-05 16:44:41 +020094COMPARISON METHODS
95------------------
96delta
97~~~~~
98If specified the 'Delta' column is displayed with value 'd' computed as:
99
100 d = A->period_percent - B->period_percent
101
102with:
103 - A/B being matching hist entry from first/second file specified
104 (or perf.data/perf.data.old) respectively.
105
106 - period_percent being the % of the hist entry period value within
107 single data file
108
109ratio
110~~~~~
111If specified the 'Ratio' column is displayed with value 'r' computed as:
112
113 r = A->period / B->period
114
115with:
116 - A/B being matching hist entry from first/second file specified
117 (or perf.data/perf.data.old) respectively.
118
119 - period being the hist entry period value
120
Jiri Olsa81d5f952012-10-05 16:44:43 +0200121wdiff
122~~~~~
123If specified the 'Weighted diff' column is displayed with value 'd' computed as:
124
125 d = B->period * WEIGHT-A - A->period * WEIGHT-B
126
127 - A/B being matching hist entry from first/second file specified
128 (or perf.data/perf.data.old) respectively.
129
130 - period being the hist entry period value
131
132 - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option
133 behind ':' separator like '-c wdiff:1,2'.
Jiri Olsa7aaf6b32012-10-05 16:44:41 +0200134
Arnaldo Carvalho de Melo86a9eee2009-12-14 20:09:31 -0200135SEE ALSO
136--------
137linkperf:perf-record[1]