blob: a095f0cabf5e208352c0386047b4a25d62d4c1bd [file] [log] [blame]
Taeung Song7d685242015-11-22 19:11:56 +09001perf-config(1)
2==============
3
4NAME
5----
6perf-config - Get and set variables in a configuration file.
7
8SYNOPSIS
9--------
10[verse]
11'perf config' -l | --list
12
13DESCRIPTION
14-----------
15You can manage variables in a configuration file with this command.
16
17OPTIONS
18-------
19
20-l::
21--list::
22 Show current config variables, name and value, for all sections.
23
24CONFIGURATION FILE
25------------------
26
27The perf configuration file contains many variables to change various
28aspects of each of its tools, including output, disk usage, etc.
29The '$HOME/.perfconfig' file is used to store a per-user configuration.
30The file '$(sysconfdir)/perfconfig' can be used to
31store a system-wide default configuration.
32
33Syntax
34~~~~~~
35
36The file consist of sections. A section starts with its name
37surrounded by square brackets and continues till the next section
38begins. Each variable must be in a section, and have the form
39'name = value', for example:
40
41 [section]
42 name1 = value1
43 name2 = value2
44
45Section names are case sensitive and can contain any characters except
46newline (double quote `"` and backslash have to be escaped as `\"` and `\\`,
47respectively). Section headers can't span multiple lines.
48
49Example
50~~~~~~~
51
52Given a $HOME/.perfconfig like this:
53
54#
55# This is the config file, and
56# a '#' and ';' character indicates a comment
57#
58
59 [colors]
60 # Color variables
61 top = red, default
62 medium = green, default
63 normal = lightgray, default
64 selected = white, lightgray
Taeung Song78ce08d2016-01-08 17:16:11 +090065 jump_arrows = blue, default
Taeung Song7d685242015-11-22 19:11:56 +090066 addr = magenta, default
67 root = white, blue
68
69 [tui]
70 # Defaults if linked with libslang
71 report = on
72 annotate = on
73 top = on
74
75 [buildid]
76 # Default, disable using /dev/null
77 dir = ~/.debug
78
79 [annotate]
80 # Defaults
81 hide_src_code = false
82 use_offset = true
83 jump_arrows = true
84 show_nr_jumps = false
85
86 [help]
87 # Format can be man, info, web or html
88 format = man
89 autocorrect = 0
90
91 [ui]
92 show-headers = true
93
94 [call-graph]
95 # fp (framepointer), dwarf
96 record-mode = fp
97 print-type = graph
98 order = caller
99 sort-key = function
100
Taeung Song89debf12016-01-08 20:39:31 +0900101Variables
102~~~~~~~~~
103
104colors.*::
105 The variables for customizing the colors used in the output for the
106 'report', 'top' and 'annotate' in the TUI. They should specify the
107 foreground and background colors, separated by a comma, for example:
108
109 medium = green, lightgray
110
111 If you want to use the color configured for you terminal, just leave it
112 as 'default', for example:
113
114 medium = default, lightgray
115
116 Available colors:
117 red, yellow, green, cyan, gray, black, blue,
118 white, default, magenta, lightgray
119
120 colors.top::
121 'top' means a overhead percentage which is more than 5%.
122 And values of this variable specify percentage colors.
123 Basic key values are foreground-color 'red' and
124 background-color 'default'.
125 colors.medium::
126 'medium' means a overhead percentage which has more than 0.5%.
127 Default values are 'green' and 'default'.
128 colors.normal::
129 'normal' means the rest of overhead percentages
130 except 'top', 'medium', 'selected'.
131 Default values are 'lightgray' and 'default'.
132 colors.selected::
133 This selects the colors for the current entry in a list of entries
134 from sub-commands (top, report, annotate).
135 Default values are 'black' and 'lightgray'.
136 colors.jump_arrows::
137 Colors for jump arrows on assembly code listings
138 such as 'jns', 'jmp', 'jane', etc.
139 Default values are 'blue', 'default'.
140 colors.addr::
141 This selects colors for addresses from 'annotate'.
142 Default values are 'magenta', 'default'.
143 colors.root::
144 Colors for headers in the output of a sub-commands (top, report).
145 Default values are 'white', 'blue'.
146
Taeung Song3fa9f402016-01-08 20:39:32 +0900147tui.*, gtk.*::
148 Subcommands that can be configured here are 'top', 'report' and 'annotate'.
149 These values are booleans, for example:
150
151 [tui]
152 top = true
153
154 will make the TUI be the default for the 'top' subcommand. Those will be
155 available if the required libs were detected at tool build time.
156
Taeung Song27335252016-01-08 20:39:33 +0900157buildid.*::
158 buildid.dir::
159 Each executable and shared library in modern distributions comes with a
160 content based identifier that, if available, will be inserted in a
161 'perf.data' file header to, at analysis time find what is needed to do
162 symbol resolution, code annotation, etc.
163
164 The recording tools also stores a hard link or copy in a per-user
165 directory, $HOME/.debug/, of binaries, shared libraries, /proc/kallsyms
166 and /proc/kcore files to be used at analysis time.
167
168 The buildid.dir variable can be used to either change this directory
169 cache location, or to disable it altogether. If you want to disable it,
170 set buildid.dir to /dev/null. The default is $HOME/.debug
171
Taeung Song7d685242015-11-22 19:11:56 +0900172SEE ALSO
173--------
174linkperf:perf[1]