Loading...
1perf-diff(1)
2============
3
4NAME
5----
6perf-diff - Read perf.data files and display the differential profile
7
8SYNOPSIS
9--------
10[verse]
11'perf diff' [baseline file] [data file1] [[data file2] ... ]
12
13DESCRIPTION
14-----------
15This command displays the performance difference amongst two or more perf.data
16files captured via perf record.
17
18If no parameters are passed it will assume perf.data.old and perf.data.
19
20The differential profile is displayed only for events matching both
21specified perf.data files.
22
23If no parameters are passed the samples will be sorted by dso and symbol.
24As the perf.data files could come from different binaries, the symbols addresses
25could vary. So perf diff is based on the comparison of the files and
26symbols name.
27
28OPTIONS
29-------
30-D::
31--dump-raw-trace::
32 Dump raw trace in ASCII.
33
34--kallsyms=<file>::
35 kallsyms pathname
36
37-m::
38--modules::
39 Load module symbols. WARNING: use only with -k and LIVE kernel
40
41-d::
42--dsos=::
43 Only consider symbols in these dsos. CSV that understands
44 file://filename entries. This option will affect the percentage
45 of the Baseline/Delta column. See --percentage for more info.
46
47-C::
48--comms=::
49 Only consider symbols in these comms. CSV that understands
50 file://filename entries. This option will affect the percentage
51 of the Baseline/Delta column. See --percentage for more info.
52
53-S::
54--symbols=::
55 Only consider these symbols. CSV that understands
56 file://filename entries. This option will affect the percentage
57 of the Baseline/Delta column. See --percentage for more info.
58
59-s::
60--sort=::
61 Sort by key(s): pid, comm, dso, symbol, cpu, parent, srcline.
62 Please see description of --sort in the perf-report man page.
63
64-t::
65--field-separator=::
66
67 Use a special separator character and don't pad with spaces, replacing
68 all occurrences of this separator in symbol names (and other output)
69 with a '.' character, that thus it's the only non valid separator.
70
71-v::
72--verbose::
73 Be verbose, for instance, show the raw counts in addition to the
74 diff.
75
76-q::
77--quiet::
78 Do not show any message. (Suppress -v)
79
80-f::
81--force::
82 Don't do ownership validation.
83
84--symfs=<directory>::
85 Look for files with symbols relative to this directory.
86
87-b::
88--baseline-only::
89 Show only items with match in baseline.
90
91-c::
92--compute::
93 Differential computation selection - delta, ratio, wdiff, delta-abs
94 (default is delta-abs). Default can be changed using diff.compute
95 config option. See COMPARISON METHODS section for more info.
96
97-p::
98--period::
99 Show period values for both compared hist entries.
100
101-F::
102--formula::
103 Show formula for given computation.
104
105-o::
106--order::
107 Specify compute sorting column number. 0 means sorting by baseline
108 overhead and 1 (default) means sorting by computed value of column 1
109 (data from the first file other base baseline). Values more than 1
110 can be used only if enough data files are provided.
111 The default value can be set using the diff.order config option.
112
113--percentage::
114 Determine how to display the overhead percentage of filtered entries.
115 Filters can be applied by --comms, --dsos and/or --symbols options.
116
117 "relative" means it's relative to filtered entries only so that the
118 sum of shown entries will be always 100%. "absolute" means it retains
119 the original value before and after the filter is applied.
120
121COMPARISON
122----------
123The comparison is governed by the baseline file. The baseline perf.data
124file is iterated for samples. All other perf.data files specified on
125the command line are searched for the baseline sample pair. If the pair
126is found, specified computation is made and result is displayed.
127
128All samples from non-baseline perf.data files, that do not match any
129baseline entry, are displayed with empty space within baseline column
130and possible computation results (delta) in their related column.
131
132Example files samples:
133- file A with samples f1, f2, f3, f4, f6
134- file B with samples f2, f4, f5
135- file C with samples f1, f2, f5
136
137Example output:
138 x - computation takes place for pair
139 b - baseline sample percentage
140
141- perf diff A B C
142
143 baseline/A compute/B compute/C samples
144 ---------------------------------------
145 b x f1
146 b x x f2
147 b f3
148 b x f4
149 b f6
150 x x f5
151
152- perf diff B A C
153
154 baseline/B compute/A compute/C samples
155 ---------------------------------------
156 b x x f2
157 b x f4
158 b x f5
159 x x f1
160 x f3
161 x f6
162
163- perf diff C B A
164
165 baseline/C compute/B compute/A samples
166 ---------------------------------------
167 b x f1
168 b x x f2
169 b x f5
170 x f3
171 x x f4
172 x f6
173
174COMPARISON METHODS
175------------------
176delta
177~~~~~
178If specified the 'Delta' column is displayed with value 'd' computed as:
179
180 d = A->period_percent - B->period_percent
181
182with:
183 - A/B being matching hist entry from data/baseline file specified
184 (or perf.data/perf.data.old) respectively.
185
186 - period_percent being the % of the hist entry period value within
187 single data file
188
189 - with filtering by -C, -d and/or -S, period_percent might be changed
190 relative to how entries are filtered. Use --percentage=absolute to
191 prevent such fluctuation.
192
193delta-abs
194~~~~~~~~~
195Same as 'delta` method, but sort the result with the absolute values.
196
197ratio
198~~~~~
199If specified the 'Ratio' column is displayed with value 'r' computed as:
200
201 r = A->period / B->period
202
203with:
204 - A/B being matching hist entry from data/baseline file specified
205 (or perf.data/perf.data.old) respectively.
206
207 - period being the hist entry period value
208
209wdiff:WEIGHT-B,WEIGHT-A
210~~~~~~~~~~~~~~~~~~~~~~~
211If specified the 'Weighted diff' column is displayed with value 'd' computed as:
212
213 d = B->period * WEIGHT-A - A->period * WEIGHT-B
214
215 - A/B being matching hist entry from data/baseline file specified
216 (or perf.data/perf.data.old) respectively.
217
218 - period being the hist entry period value
219
220 - WEIGHT-A/WEIGHT-B being user supplied weights in the the '-c' option
221 behind ':' separator like '-c wdiff:1,2'.
222 - WEIGHT-A being the weight of the data file
223 - WEIGHT-B being the weight of the baseline data file
224
225SEE ALSO
226--------
227linkperf:perf-record[1], linkperf:perf-report[1]
1perf-diff(1)
2============
3
4NAME
5----
6perf-diff - Read perf.data files and display the differential profile
7
8SYNOPSIS
9--------
10[verse]
11'perf diff' [baseline file] [data file1] [[data file2] ... ]
12
13DESCRIPTION
14-----------
15This command displays the performance difference amongst two or more perf.data
16files captured via perf record.
17
18If no parameters are passed it will assume perf.data.old and perf.data.
19
20The differential profile is displayed only for events matching both
21specified perf.data files.
22
23OPTIONS
24-------
25-D::
26--dump-raw-trace::
27 Dump raw trace in ASCII.
28
29-m::
30--modules::
31 Load module symbols. WARNING: use only with -k and LIVE kernel
32
33-d::
34--dsos=::
35 Only consider symbols in these dsos. CSV that understands
36 file://filename entries.
37
38-C::
39--comms=::
40 Only consider symbols in these comms. CSV that understands
41 file://filename entries.
42
43-S::
44--symbols=::
45 Only consider these symbols. CSV that understands
46 file://filename entries.
47
48-s::
49--sort=::
50 Sort by key(s): pid, comm, dso, symbol.
51
52-t::
53--field-separator=::
54
55 Use a special separator character and don't pad with spaces, replacing
56 all occurrences of this separator in symbol names (and other output)
57 with a '.' character, that thus it's the only non valid separator.
58
59-v::
60--verbose::
61 Be verbose, for instance, show the raw counts in addition to the
62 diff.
63
64-f::
65--force::
66 Don't complain, do it.
67
68--symfs=<directory>::
69 Look for files with symbols relative to this directory.
70
71-b::
72--baseline-only::
73 Show only items with match in baseline.
74
75-c::
76--compute::
77 Differential computation selection - delta,ratio,wdiff (default is delta).
78 See COMPARISON METHODS section for more info.
79
80-p::
81--period::
82 Show period values for both compared hist entries.
83
84-F::
85--formula::
86 Show formula for given computation.
87
88-o::
89--order::
90 Specify compute sorting column number.
91
92COMPARISON
93----------
94The comparison is governed by the baseline file. The baseline perf.data
95file is iterated for samples. All other perf.data files specified on
96the command line are searched for the baseline sample pair. If the pair
97is found, specified computation is made and result is displayed.
98
99All samples from non-baseline perf.data files, that do not match any
100baseline entry, are displayed with empty space within baseline column
101and possible computation results (delta) in their related column.
102
103Example files samples:
104- file A with samples f1, f2, f3, f4, f6
105- file B with samples f2, f4, f5
106- file C with samples f1, f2, f5
107
108Example output:
109 x - computation takes place for pair
110 b - baseline sample percentage
111
112- perf diff A B C
113
114 baseline/A compute/B compute/C samples
115 ---------------------------------------
116 b x f1
117 b x x f2
118 b f3
119 b x f4
120 b f6
121 x x f5
122
123- perf diff B A C
124
125 baseline/B compute/A compute/C samples
126 ---------------------------------------
127 b x x f2
128 b x f4
129 b x f5
130 x x f1
131 x f3
132 x f6
133
134- perf diff C B A
135
136 baseline/C compute/B compute/A samples
137 ---------------------------------------
138 b x f1
139 b x x f2
140 b x f5
141 x f3
142 x x f4
143 x f6
144
145COMPARISON METHODS
146------------------
147delta
148~~~~~
149If specified the 'Delta' column is displayed with value 'd' computed as:
150
151 d = A->period_percent - B->period_percent
152
153with:
154 - A/B being matching hist entry from data/baseline file specified
155 (or perf.data/perf.data.old) respectively.
156
157 - period_percent being the % of the hist entry period value within
158 single data file
159
160ratio
161~~~~~
162If specified the 'Ratio' column is displayed with value 'r' computed as:
163
164 r = A->period / B->period
165
166with:
167 - A/B being matching hist entry from data/baseline file specified
168 (or perf.data/perf.data.old) respectively.
169
170 - period being the hist entry period value
171
172wdiff:WEIGHT-B,WEIGHT-A
173~~~~~~~~~~~~~~~~~~~~~~~
174If specified the 'Weighted diff' column is displayed with value 'd' computed as:
175
176 d = B->period * WEIGHT-A - A->period * WEIGHT-B
177
178 - A/B being matching hist entry from data/baseline file specified
179 (or perf.data/perf.data.old) respectively.
180
181 - period being the hist entry period value
182
183 - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option
184 behind ':' separator like '-c wdiff:1,2'.
185 - WIEGHT-A being the weight of the data file
186 - WIEGHT-B being the weight of the baseline data file
187
188SEE ALSO
189--------
190linkperf:perf-record[1]