6 perf-diff - Read perf.data files and display the differential profile
11 'perf diff' [baseline file] [data file1] [[data file2] ... ]
15 This command displays the performance difference amongst two or more perf.data
16 files captured via perf record.
18 If no parameters are passed it will assume perf.data.old and perf.data.
20 The differential profile is displayed only for events matching both
21 specified perf.data files.
23 If no parameters are passed the samples will be sorted by dso and symbol.
24 As the perf.data files could come from different binaries, the symbols addresses
25 could vary. So perf diff is based on the comparison of the files and
32 Dump raw trace in ASCII.
36 Load module symbols. WARNING: use only with -k and LIVE kernel
40 Only consider symbols in these dsos. CSV that understands
41 file://filename entries. This option will affect the percentage
42 of the Baseline/Delta column. See --percentage for more info.
46 Only consider symbols in these comms. CSV that understands
47 file://filename entries. This option will affect the percentage
48 of the Baseline/Delta column. See --percentage for more info.
52 Only consider these symbols. CSV that understands
53 file://filename entries. This option will affect the percentage
54 of the Baseline/Delta column. See --percentage for more info.
58 Sort by key(s): pid, comm, dso, symbol, cpu, parent, srcline.
59 Please see description of --sort in the perf-report man page.
64 Use a special separator character and don't pad with spaces, replacing
65 all occurrences of this separator in symbol names (and other output)
66 with a '.' character, that thus it's the only non valid separator.
70 Be verbose, for instance, show the raw counts in addition to the
75 Don't complain, do it.
78 Look for files with symbols relative to this directory.
82 Show only items with match in baseline.
86 Differential computation selection - delta,ratio,wdiff (default is delta).
87 See COMPARISON METHODS section for more info.
91 Show period values for both compared hist entries.
95 Show formula for given computation.
99 Specify compute sorting column number.
102 Determine how to display the overhead percentage of filtered entries.
103 Filters can be applied by --comms, --dsos and/or --symbols options.
105 "relative" means it's relative to filtered entries only so that the
106 sum of shown entries will be always 100%. "absolute" means it retains
107 the original value before and after the filter is applied.
111 The comparison is governed by the baseline file. The baseline perf.data
112 file is iterated for samples. All other perf.data files specified on
113 the command line are searched for the baseline sample pair. If the pair
114 is found, specified computation is made and result is displayed.
116 All samples from non-baseline perf.data files, that do not match any
117 baseline entry, are displayed with empty space within baseline column
118 and possible computation results (delta) in their related column.
120 Example files samples:
121 - file A with samples f1, f2, f3, f4, f6
122 - file B with samples f2, f4, f5
123 - file C with samples f1, f2, f5
126 x - computation takes place for pair
127 b - baseline sample percentage
131 baseline/A compute/B compute/C samples
132 ---------------------------------------
142 baseline/B compute/A compute/C samples
143 ---------------------------------------
153 baseline/C compute/B compute/A samples
154 ---------------------------------------
166 If specified the 'Delta' column is displayed with value 'd' computed as:
168 d = A->period_percent - B->period_percent
171 - A/B being matching hist entry from data/baseline file specified
172 (or perf.data/perf.data.old) respectively.
174 - period_percent being the % of the hist entry period value within
177 - with filtering by -C, -d and/or -S, period_percent might be changed
178 relative to how entries are filtered. Use --percentage=absolute to
179 prevent such fluctuation.
183 If specified the 'Ratio' column is displayed with value 'r' computed as:
185 r = A->period / B->period
188 - A/B being matching hist entry from data/baseline file specified
189 (or perf.data/perf.data.old) respectively.
191 - period being the hist entry period value
193 wdiff:WEIGHT-B,WEIGHT-A
194 ~~~~~~~~~~~~~~~~~~~~~~~
195 If specified the 'Weighted diff' column is displayed with value 'd' computed as:
197 d = B->period * WEIGHT-A - A->period * WEIGHT-B
199 - A/B being matching hist entry from data/baseline file specified
200 (or perf.data/perf.data.old) respectively.
202 - period being the hist entry period value
204 - WEIGHT-A/WEIGHT-B being user supplied weights in the the '-c' option
205 behind ':' separator like '-c wdiff:1,2'.
206 - WEIGHT-A being the weight of the data file
207 - WEIGHT-B being the weight of the baseline data file
211 linkperf:perf-record[1], linkperf:perf-report[1]