aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug88
1 files changed, 55 insertions, 33 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 898e07c33c3c..c6e854f215fa 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -440,7 +440,7 @@ config LOCKDEP
440 bool 440 bool
441 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 441 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
442 select STACKTRACE 442 select STACKTRACE
443 select FRAME_POINTER if !X86 && !MIPS && !PPC 443 select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND
444 select KALLSYMS 444 select KALLSYMS
445 select KALLSYMS_ALL 445 select KALLSYMS_ALL
446 446
@@ -834,6 +834,7 @@ config SYSCTL_SYSCALL_CHECK
834 to properly maintain and use. This enables checks that help 834 to properly maintain and use. This enables checks that help
835 you to keep things correct. 835 you to keep things correct.
836 836
837source mm/Kconfig.debug
837source kernel/trace/Kconfig 838source kernel/trace/Kconfig
838 839
839config PROVIDE_OHCI1394_DMA_INIT 840config PROVIDE_OHCI1394_DMA_INIT
@@ -876,7 +877,7 @@ config FIREWIRE_OHCI_REMOTE_DMA
876 877
877 If unsure, say N. 878 If unsure, say N.
878 879
879menuconfig BUILD_DOCSRC 880config BUILD_DOCSRC
880 bool "Build targets in Documentation/ tree" 881 bool "Build targets in Documentation/ tree"
881 depends on HEADERS_CHECK 882 depends on HEADERS_CHECK
882 help 883 help
@@ -885,60 +886,81 @@ menuconfig BUILD_DOCSRC
885 886
886 Say N if you are unsure. 887 Say N if you are unsure.
887 888
888config DYNAMIC_PRINTK_DEBUG 889config DYNAMIC_DEBUG
889 bool "Enable dynamic printk() call support" 890 bool "Enable dynamic printk() support"
890 default n 891 default n
891 depends on PRINTK 892 depends on PRINTK
893 depends on DEBUG_FS
892 select PRINTK_DEBUG 894 select PRINTK_DEBUG
893 help 895 help
894 896
895 Compiles debug level messages into the kernel, which would not 897 Compiles debug level messages into the kernel, which would not
896 otherwise be available at runtime. These messages can then be 898 otherwise be available at runtime. These messages can then be
897 enabled/disabled on a per module basis. This mechanism implicitly 899 enabled/disabled based on various levels of scope - per source file,
898 enables all pr_debug() and dev_dbg() calls. The impact of this 900 function, module, format string, and line number. This mechanism
899 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%.
900 903
901 Usage: 904 Usage:
902 905
903 Dynamic debugging is controlled by the debugfs file, 906 Dynamic debugging is controlled via the 'dynamic_debug/ddebug' file,
904 dynamic_printk/modules. This file contains a list of the modules that 907 which is contained in the 'debugfs' filesystem. Thus, the debugfs
905 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.
906 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
907 '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:
908 912
909 <module_name> <enabled=0/1> 913 filename:lineno [module]function flags format
910 .
911 .
912 .
913 914
914 <module_name> : Name of the module in which the debug call resides 915 filename : source file of the debug statement
915 <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
916 921
917 From a live system: 922 From a live system:
918 923
919 snd_hda_intel enabled=0 924 nullarbor:~ # cat <debugfs>/dynamic_debug/ddebug
920 fixup enabled=0 925 # filename:lineno [module]function flags format
921 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"
922 929
923 Enable a module: 930 Example usage:
924 931
925 $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
926 935
927 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
928 939
929 $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
930 943
931 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
932 947
933 $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
934 951
935 Disable all modules: 952 See Documentation/dynamic-debug-howto.txt for additional information.
936 953
937 $echo "set enabled=0 all" > dynamic_printk/modules 954config DMA_API_DEBUG
938 955 bool "Enable debugging of DMA-API usage"
939 Finally, passing "dynamic_printk" at the command line enables 956 depends on HAVE_DMA_API_DEBUG
940 debugging for all modules. This mode can be turned off via the above 957 help
941 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.
942 964
943source "samples/Kconfig" 965source "samples/Kconfig"
944 966