summaryrefslogtreecommitdiff
path: root/tools/perf/Documentation/perf-diff.txt
blob: 21cc2ef7756b9b3f652d575c51562f69b4a0835e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
perf-diff(1)
============

NAME
----
perf-diff - Read two perf.data files and display the differential profile

SYNOPSIS
--------
[verse]
'perf diff' [oldfile] [newfile]

DESCRIPTION
-----------
This command displays the performance difference amongst two perf.data files
captured via perf record.

If no parameters are passed it will assume perf.data.old and perf.data.

The differential profile is displayed only for events matching both
specified perf.data files.

OPTIONS
-------
-M::
--displacement::
        Show position displacement relative to baseline.

-D::
--dump-raw-trace::
        Dump raw trace in ASCII.

-m::
--modules::
        Load module symbols. WARNING: use only with -k and LIVE kernel

-d::
--dsos=::
	Only consider symbols in these dsos. CSV that understands
	file://filename entries.

-C::
--comms=::
	Only consider symbols in these comms. CSV that understands
	file://filename entries.

-S::
--symbols=::
	Only consider these symbols. CSV that understands
	file://filename entries.

-s::
--sort=::
	Sort by key(s): pid, comm, dso, symbol.

-t::
--field-separator=::

	Use a special separator character and don't pad with spaces, replacing
	all occurrences of this separator in symbol names (and other output)
	with a '.' character, that thus it's the only non valid separator.

-v::
--verbose::
	Be verbose, for instance, show the raw counts in addition to the
	diff.

-f::
--force::
       Don't complain, do it.

--symfs=<directory>::
        Look for files with symbols relative to this directory.

-b::
--baseline-only::
        Show only items with match in baseline.

-c::
--compute::
        Differential computation selection - delta,ratio,wdiff (default is delta).
        If '+' is specified as a first character, the output is sorted based
        on the computation results.
        See COMPARISON METHODS section for more info.

-p::
--period::
        Show period values for both compared hist entries.

COMPARISON METHODS
------------------
delta
~~~~~
If specified the 'Delta' column is displayed with value 'd' computed as:

  d = A->period_percent - B->period_percent

with:
  - A/B being matching hist entry from first/second file specified
    (or perf.data/perf.data.old) respectively.

  - period_percent being the % of the hist entry period value within
    single data file

ratio
~~~~~
If specified the 'Ratio' column is displayed with value 'r' computed as:

  r = A->period / B->period

with:
  - A/B being matching hist entry from first/second file specified
    (or perf.data/perf.data.old) respectively.

  - period being the hist entry period value

wdiff
~~~~~
If specified the 'Weighted diff' column is displayed with value 'd' computed as:

   d = B->period * WEIGHT-A - A->period * WEIGHT-B

  - A/B being matching hist entry from first/second file specified
    (or perf.data/perf.data.old) respectively.

  - period being the hist entry period value

  - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option
    behind ':' separator like '-c wdiff:1,2'.

SEE ALSO
--------
linkperf:perf-record[1]