1
2menu "Debugging Options"
3
4config DEBUG
5	bool "Developer Checks"
6	default y
7	help
8	  If you say Y here this will enable developer checks such as asserts
9	  and extra printks. This option is intended for development purposes
10	  only, and not for production use.
11
12	  You probably want to say 'N' here.
13
14if DEBUG || EXPERT
15
16config GDBSX
17	bool "Guest debugging with gdbsx"
18	depends on X86
19	default y
20	help
21	  If you want to enable support for debugging guests from dom0 via
22	  gdbsx then say Y.
23
24config FRAME_POINTER
25	bool "Compile Xen with frame pointers"
26	default DEBUG
27	help
28	  If you say Y here the resulting Xen will be slightly larger and
29	  maybe slower, but it gives very useful debugging information
30	  in case of any Xen bugs.
31
32config SELF_TESTS
33	bool "Extra self-testing"
34	default DEBUG
35	help
36	  Enable extra unit and functional testing.
37
38config COVERAGE
39	bool "Code coverage support"
40	depends on SYSCTL && !LIVEPATCH
41	select SUPPRESS_DUPLICATE_SYMBOL_WARNINGS if !ENFORCE_UNIQUE_SYMBOLS
42	help
43	  Enable code coverage support.
44
45	  If unsure, say N here.
46
47config CONDITION_COVERAGE
48	bool "Condition coverage support"
49	depends on COVERAGE && CC_HAS_MCDC
50	help
51	  Enable condition coverage support. Used for collecting MC/DC
52	  (Modified Condition/Decision Coverage) metrics.
53
54	  If unsure, say N here.
55
56config DEBUG_LOCK_PROFILE
57	bool "Lock Profiling"
58	select DEBUG_LOCKS
59	help
60	  Lock profiling allows you to see how often locks are taken and blocked.
61	  You can use serial console to print (and reset) using 'l' and 'L'
62	  respectively, or the 'xenlockprof' tool.
63
64config DEBUG_LOCKS
65	bool "Lock debugging"
66	default DEBUG
67	help
68	  Enable debugging features of lock handling.  Some additional
69	  checks will be performed when acquiring and releasing locks.
70
71config PERF_COUNTERS
72	bool "Performance Counters"
73	help
74	  Enables software performance counters that allows you to analyze
75	  bottlenecks in the system.  To access this data you can use serial
76	  console to print (and reset) using 'p' and 'P' respectively, or
77	  the 'xenperf' tool.
78
79config PERF_ARRAYS
80	bool "Performance Counter Array Histograms"
81	depends on PERF_COUNTERS
82	help
83	  Enables software performance counter array histograms.
84
85
86config VERBOSE_DEBUG
87	bool "Verbose debug messages"
88	default DEBUG
89	help
90	  Guest output from HYPERVISOR_console_io and hypervisor parsing
91	  ELF images (dom0) will be logged in the Xen ring buffer.
92
93config DEVICE_TREE_DEBUG
94	bool "Device tree debug messages"
95	depends on DEVICE_TREE_PARSE
96	help
97	  Device tree parsing and DOM0 device tree building messages are
98	  logged in the Xen ring buffer.
99	  If unsure, say N here.
100
101config SCRUB_DEBUG
102	bool "Page scrubbing test"
103	default DEBUG
104	help
105	  Verify that pages that need to be scrubbed before being allocated to
106	  a guest are indeed scrubbed.
107
108config UBSAN
109	bool "Undefined behaviour sanitizer"
110	depends on HAS_UBSAN
111	help
112	  Enable undefined behaviour sanitizer. It uses compiler to insert code
113	  snippets so that undefined behaviours in C are detected during runtime.
114	  This requires a UBSAN capable compiler and it is a debug only feature.
115
116	  If unsure, say N here.
117
118config UBSAN_FATAL
119	bool "Panic on UBSAN failure"
120	depends on UBSAN
121	help
122	  Enabling this option will cause Xen to panic when an undefined behavior
123	  is detected by UBSAN. If unsure, say N here.
124
125config DEBUG_TRACE
126	bool "Debug trace support"
127	help
128	  Debug trace enables to record debug trace messages which are printed
129	  either directly to the console or are printed to console in case of
130	  a system crash.
131
132config XMEM_POOL_POISON
133	bool "Poison free xenpool blocks"
134	default DEBUG
135	help
136	  Poison free blocks with 0xAA bytes and verify them when a block is
137	  allocated in order to spot use-after-free issues.
138
139source "arch/$(SRCARCH)/Kconfig.debug"
140
141endif # DEBUG || EXPERT
142
143config DEBUG_INFO
144	bool "Compile Xen with debug info"
145	default DEBUG || LIVEPATCH
146	help
147	  Say Y here if you want to build Xen with debug information. This
148	  information is needed e.g. for doing crash dump analysis of the
149	  hypervisor via the "crash" tool.
150	  Saying Y will increase the size of the xen-syms and xen.efi
151	  binaries. In case the space on the EFI boot partition is rather
152	  limited, you may want to install a stripped variant of xen.efi in
153	  the EFI boot partition (look for "INSTALL_EFI_STRIP" in
154	  docs/misc/efi.pandoc for more information - when not using
155	  "make install-xen" for installing xen.efi, stripping needs to be
156	  done outside the Xen build environment).
157
158endmenu
159