1perf-diff(1)
2============
3
4NAME
5----
6perf-diff - Read two perf.data files and display the differential profile
7
8SYNOPSIS
9--------
10[verse]
11'perf diff' [oldfile] [newfile]
12
13DESCRIPTION
14-----------
15This command displays the performance difference amongst two perf.data files
16captured 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-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
37-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
60	all occurrences of this separator in symbol names (and other output)
61	with a '.' character, that thus it's the only non valid separator.
62
63-v::
64--verbose::
65	Be verbose, for instance, show the raw counts in addition to the
66	diff.
67
68-f::
69--force::
70       Don't complain, do it.
71
72--symfs=<directory>::
73        Look for files with symbols relative to this directory.
74
75-b::
76--baseline-only::
77        Show only items with match in baseline.
78
79-c::
80--compute::
81        Differential computation selection - delta,ratio,wdiff (default is delta).
82        If '+' is specified as a first character, the output is sorted based
83        on the computation results.
84        See COMPARISON METHODS section for more info.
85
86-p::
87--period::
88        Show period values for both compared hist entries.
89
90-F::
91--formula::
92        Show formula for given computation.
93
94COMPARISON 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
121wdiff
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'.
134
135SEE ALSO
136--------
137linkperf:perf-record[1]
138