Skip to content

Commit 9b5a7f4

Browse files
hansendcsuryasaimadhu
authored andcommitted
x86/configs: Add x86 debugging Kconfig fragment plus docs
The kernel has a wide variety of debugging options to help catch and squash bugs. However, new debugging is added all the time and the existing options can be hard to find. Add a Kconfig fragment with the debugging options which tip maintainers expect to be used to test contributions. This should make it easier for contributors to test their code and find issues before submission. [ bp: Add to "make help" output, fix DEBUG_INFO selection as pointed out by Nathan Chancellor <[email protected]>. ] Signed-off-by: Dave Hansen <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3123109 commit 9b5a7f4

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

Documentation/process/maintainer-tip.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,20 @@ in a private repository which allows interested people to easily pull the
437437
series for testing. The usual way to offer this is a git URL in the cover
438438
letter of the patch series.
439439

440+
Testing
441+
^^^^^^^
442+
443+
Code should be tested before submitting to the tip maintainers. Anything
444+
other than minor changes should be built, booted and tested with
445+
comprehensive (and heavyweight) kernel debugging options enabled.
446+
447+
These debugging options can be found in kernel/configs/x86_debug.config
448+
and can be added to an existing kernel config by running:
449+
450+
make x86_debug.config
451+
452+
Some of these options are x86-specific and can be left out when testing
453+
on other architectures.
440454

441455
Coding style notes
442456
------------------

arch/x86/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,5 +313,6 @@ define archhelp
313313
echo ''
314314
echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest'
315315
echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest'
316+
echo ' x86_debug.config - Enable tip tree debugging options for testing'
316317

317318
endef

kernel/configs/x86_debug.config

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CONFIG_X86_DEBUG_FPU=y
2+
CONFIG_LOCK_STAT=y
3+
CONFIG_DEBUG_VM=y
4+
CONFIG_DEBUG_VM_VMACACHE=y
5+
CONFIG_DEBUG_VM_RB=y
6+
CONFIG_DEBUG_SLAB=y
7+
CONFIG_DEBUG_KMEMLEAK=y
8+
CONFIG_DEBUG_PAGEALLOC=y
9+
CONFIG_SLUB_DEBUG_ON=y
10+
CONFIG_KMEMCHECK=y
11+
CONFIG_DEBUG_OBJECTS=y
12+
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
13+
CONFIG_GCOV_KERNEL=y
14+
CONFIG_LOCKDEP=y
15+
CONFIG_PROVE_LOCKING=y
16+
CONFIG_SCHEDSTATS=y
17+
CONFIG_VMLINUX_VALIDATION=y
18+
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y

0 commit comments

Comments
 (0)