aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug130
1 files changed, 95 insertions, 35 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1bcf9cd4baa0..812c28207baf 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -186,6 +186,44 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
186 default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC 186 default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
187 default 1 if BOOTPARAM_SOFTLOCKUP_PANIC 187 default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
188 188
189config DETECT_HUNG_TASK
190 bool "Detect Hung Tasks"
191 depends on DEBUG_KERNEL
192 default DETECT_SOFTLOCKUP
193 help
194 Say Y here to enable the kernel to detect "hung tasks",
195 which are bugs that cause the task to be stuck in
196 uninterruptible "D" state indefinitiley.
197
198 When a hung task is detected, the kernel will print the
199 current stack trace (which you should report), but the
200 task will stay in uninterruptible state. If lockdep is
201 enabled then all held locks will also be reported. This
202 feature has negligible overhead.
203
204config BOOTPARAM_HUNG_TASK_PANIC
205 bool "Panic (Reboot) On Hung Tasks"
206 depends on DETECT_HUNG_TASK
207 help
208 Say Y here to enable the kernel to panic on "hung tasks",
209 which are bugs that cause the kernel to leave a task stuck
210 in uninterruptible "D" state.
211
212 The panic can be used in combination with panic_timeout,
213 to cause the system to reboot automatically after a
214 hung task has been detected. This feature is useful for
215 high-availability systems that have uptime guarantees and
216 where a hung tasks must be resolved ASAP.
217
218 Say N if unsure.
219
220config BOOTPARAM_HUNG_TASK_PANIC_VALUE
221 int
222 depends on DETECT_HUNG_TASK
223 range 0 1
224 default 0 if !BOOTPARAM_HUNG_TASK_PANIC
225 default 1 if BOOTPARAM_HUNG_TASK_PANIC
226
189config SCHED_DEBUG 227config SCHED_DEBUG
190 bool "Collect scheduler debugging info" 228 bool "Collect scheduler debugging info"
191 depends on DEBUG_KERNEL && PROC_FS 229 depends on DEBUG_KERNEL && PROC_FS
@@ -402,7 +440,7 @@ config LOCKDEP
402 bool 440 bool
403 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 441 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
404 select STACKTRACE 442 select STACKTRACE
405 select FRAME_POINTER if !X86 && !MIPS && !PPC 443 select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND && !S390
406 select KALLSYMS 444 select KALLSYMS
407 select KALLSYMS_ALL 445 select KALLSYMS_ALL
408 446
@@ -582,7 +620,7 @@ config ARCH_WANT_FRAME_POINTERS
582config FRAME_POINTER 620config FRAME_POINTER
583 bool "Compile the kernel with frame pointers" 621 bool "Compile the kernel with frame pointers"
584 depends on DEBUG_KERNEL && \ 622 depends on DEBUG_KERNEL && \
585 (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ 623 (CRIS || M68K || M68KNOMMU || FRV || UML || \
586 AVR32 || SUPERH || BLACKFIN || MN10300) || \ 624 AVR32 || SUPERH || BLACKFIN || MN10300) || \
587 ARCH_WANT_FRAME_POINTERS 625 ARCH_WANT_FRAME_POINTERS
588 default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS 626 default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
@@ -771,13 +809,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER
771 depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT 809 depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
772 depends on !X86_64 810 depends on !X86_64
773 select STACKTRACE 811 select STACKTRACE
774 select FRAME_POINTER if !PPC 812 select FRAME_POINTER if !PPC && !S390
775 help 813 help
776 Provide stacktrace filter for fault-injection capabilities 814 Provide stacktrace filter for fault-injection capabilities
777 815
778config LATENCYTOP 816config LATENCYTOP
779 bool "Latency measuring infrastructure" 817 bool "Latency measuring infrastructure"
780 select FRAME_POINTER if !MIPS && !PPC 818 select FRAME_POINTER if !MIPS && !PPC && !S390
781 select KALLSYMS 819 select KALLSYMS
782 select KALLSYMS_ALL 820 select KALLSYMS_ALL
783 select STACKTRACE 821 select STACKTRACE
@@ -796,6 +834,7 @@ config SYSCTL_SYSCALL_CHECK
796 to properly maintain and use. This enables checks that help 834 to properly maintain and use. This enables checks that help
797 you to keep things correct. 835 you to keep things correct.
798 836
837source mm/Kconfig.debug
799source kernel/trace/Kconfig 838source kernel/trace/Kconfig
800 839
801config PROVIDE_OHCI1394_DMA_INIT 840config PROVIDE_OHCI1394_DMA_INIT
@@ -847,60 +886,81 @@ config BUILD_DOCSRC
847 886
848 Say N if you are unsure. 887 Say N if you are unsure.
849 888
850config DYNAMIC_PRINTK_DEBUG 889config DYNAMIC_DEBUG
851 bool "Enable dynamic printk() call support" 890 bool "Enable dynamic printk() support"
852 default n 891 default n
853 depends on PRINTK 892 depends on PRINTK
893 depends on DEBUG_FS
854 select PRINTK_DEBUG 894 select PRINTK_DEBUG
855 help 895 help
856 896
857 Compiles debug level messages into the kernel, which would not 897 Compiles debug level messages into the kernel, which would not
858 otherwise be available at runtime. These messages can then be 898 otherwise be available at runtime. These messages can then be
859 enabled/disabled on a per module basis. This mechanism implicitly 899 enabled/disabled based on various levels of scope - per source file,
860 enables all pr_debug() and dev_dbg() calls. The impact of this 900 function, module, format string, and line number. This mechanism
861 compile option is a larger kernel text size of about 2%. 901 implicitly enables all pr_debug() and dev_dbg() calls. The impact of
902 this compile option is a larger kernel text size of about 2%.
862 903
863 Usage: 904 Usage:
864 905
865 Dynamic debugging is controlled by the debugfs file, 906 Dynamic debugging is controlled via the 'dynamic_debug/ddebug' file,
866 dynamic_printk/modules. This file contains a list of the modules that 907 which is contained in the 'debugfs' filesystem. Thus, the debugfs
867 can be enabled. The format of the file is the module name, followed 908 filesystem must first be mounted before making use of this feature.
868 by a set of flags that can be enabled. The first flag is always the 909 We refer the control file as: <debugfs>/dynamic_debug/ddebug. This
869 'enabled' flag. For example: 910 file contains a list of the debug statements that can be enabled. The
911 format for each line of the file is:
870 912
871 <module_name> <enabled=0/1> 913 filename:lineno [module]function flags format
872 .
873 .
874 .
875 914
876 <module_name> : Name of the module in which the debug call resides 915 filename : source file of the debug statement
877 <enabled=0/1> : whether the messages are enabled or not 916 lineno : line number of the debug statement
917 module : module that contains the debug statement
918 function : function that contains the debug statement
919 flags : 'p' means the line is turned 'on' for printing
920 format : the format used for the debug statement
878 921
879 From a live system: 922 From a live system:
880 923
881 snd_hda_intel enabled=0 924 nullarbor:~ # cat <debugfs>/dynamic_debug/ddebug
882 fixup enabled=0 925 # filename:lineno [module]function flags format
883 driver enabled=0 926 fs/aio.c:222 [aio]__put_ioctx - "__put_ioctx:\040freeing\040%p\012"
927 fs/aio.c:248 [aio]ioctx_alloc - "ENOMEM:\040nr_events\040too\040high\012"
928 fs/aio.c:1770 [aio]sys_io_cancel - "calling\040cancel\012"
884 929
885 Enable a module: 930 Example usage:
886 931
887 $echo "set enabled=1 <module_name>" > dynamic_printk/modules 932 // enable the message at line 1603 of file svcsock.c
933 nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
934 <debugfs>/dynamic_debug/ddebug
888 935
889 Disable a module: 936 // enable all the messages in file svcsock.c
937 nullarbor:~ # echo -n 'file svcsock.c +p' >
938 <debugfs>/dynamic_debug/ddebug
890 939
891 $echo "set enabled=0 <module_name>" > dynamic_printk/modules 940 // enable all the messages in the NFS server module
941 nullarbor:~ # echo -n 'module nfsd +p' >
942 <debugfs>/dynamic_debug/ddebug
892 943
893 Enable all modules: 944 // enable all 12 messages in the function svc_process()
945 nullarbor:~ # echo -n 'func svc_process +p' >
946 <debugfs>/dynamic_debug/ddebug
894 947
895 $echo "set enabled=1 all" > dynamic_printk/modules 948 // disable all 12 messages in the function svc_process()
949 nullarbor:~ # echo -n 'func svc_process -p' >
950 <debugfs>/dynamic_debug/ddebug
896 951
897 Disable all modules: 952 See Documentation/dynamic-debug-howto.txt for additional information.
898 953
899 $echo "set enabled=0 all" > dynamic_printk/modules 954config DMA_API_DEBUG
900 955 bool "Enable debugging of DMA-API usage"
901 Finally, passing "dynamic_printk" at the command line enables 956 depends on HAVE_DMA_API_DEBUG
902 debugging for all modules. This mode can be turned off via the above 957 help
903 disable command. 958 Enable this option to debug the use of the DMA API by device drivers.
959 With this option you will be able to detect common bugs in device
960 drivers like double-freeing of DMA mappings or freeing mappings that
961 were never allocated.
962 This option causes a performance degredation. Use only if you want
963 to debug device drivers. If unsure, say N.
904 964
905source "samples/Kconfig" 965source "samples/Kconfig"
906 966