aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug85
1 files changed, 53 insertions, 32 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a0879b2e8b6b..58bfe7e8faba 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -402,7 +402,7 @@ config LOCKDEP
402 bool 402 bool
403 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 403 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
404 select STACKTRACE 404 select STACKTRACE
405 select FRAME_POINTER if !MIPS && !PPC 405 select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND
406 select KALLSYMS 406 select KALLSYMS
407 select KALLSYMS_ALL 407 select KALLSYMS_ALL
408 408
@@ -847,60 +847,81 @@ config BUILD_DOCSRC
847 847
848 Say N if you are unsure. 848 Say N if you are unsure.
849 849
850config DYNAMIC_PRINTK_DEBUG 850config DYNAMIC_DEBUG
851 bool "Enable dynamic printk() call support" 851 bool "Enable dynamic printk() support"
852 default n 852 default n
853 depends on PRINTK 853 depends on PRINTK
854 depends on DEBUG_FS
854 select PRINTK_DEBUG 855 select PRINTK_DEBUG
855 help 856 help
856 857
857 Compiles debug level messages into the kernel, which would not 858 Compiles debug level messages into the kernel, which would not
858 otherwise be available at runtime. These messages can then be 859 otherwise be available at runtime. These messages can then be
859 enabled/disabled on a per module basis. This mechanism implicitly 860 enabled/disabled based on various levels of scope - per source file,
860 enables all pr_debug() and dev_dbg() calls. The impact of this 861 function, module, format string, and line number. This mechanism
861 compile option is a larger kernel text size of about 2%. 862 implicitly enables all pr_debug() and dev_dbg() calls. The impact of
863 this compile option is a larger kernel text size of about 2%.
862 864
863 Usage: 865 Usage:
864 866
865 Dynamic debugging is controlled by the debugfs file, 867 Dynamic debugging is controlled via the 'dynamic_debug/ddebug' file,
866 dynamic_printk/modules. This file contains a list of the modules that 868 which is contained in the 'debugfs' filesystem. Thus, the debugfs
867 can be enabled. The format of the file is the module name, followed 869 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 870 We refer the control file as: <debugfs>/dynamic_debug/ddebug. This
869 'enabled' flag. For example: 871 file contains a list of the debug statements that can be enabled. The
872 format for each line of the file is:
870 873
871 <module_name> <enabled=0/1> 874 filename:lineno [module]function flags format
872 .
873 .
874 .
875 875
876 <module_name> : Name of the module in which the debug call resides 876 filename : source file of the debug statement
877 <enabled=0/1> : whether the messages are enabled or not 877 lineno : line number of the debug statement
878 module : module that contains the debug statement
879 function : function that contains the debug statement
880 flags : 'p' means the line is turned 'on' for printing
881 format : the format used for the debug statement
878 882
879 From a live system: 883 From a live system:
880 884
881 snd_hda_intel enabled=0 885 nullarbor:~ # cat <debugfs>/dynamic_debug/ddebug
882 fixup enabled=0 886 # filename:lineno [module]function flags format
883 driver enabled=0 887 fs/aio.c:222 [aio]__put_ioctx - "__put_ioctx:\040freeing\040%p\012"
884 888 fs/aio.c:248 [aio]ioctx_alloc - "ENOMEM:\040nr_events\040too\040high\012"
885 Enable a module: 889 fs/aio.c:1770 [aio]sys_io_cancel - "calling\040cancel\012"
886 890
887 $echo "set enabled=1 <module_name>" > dynamic_printk/modules 891 Example usage:
888 892
889 Disable a module: 893 // enable the message at line 1603 of file svcsock.c
894 nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
895 <debugfs>/dynamic_debug/ddebug
890 896
891 $echo "set enabled=0 <module_name>" > dynamic_printk/modules 897 // enable all the messages in file svcsock.c
898 nullarbor:~ # echo -n 'file svcsock.c +p' >
899 <debugfs>/dynamic_debug/ddebug
892 900
893 Enable all modules: 901 // enable all the messages in the NFS server module
902 nullarbor:~ # echo -n 'module nfsd +p' >
903 <debugfs>/dynamic_debug/ddebug
894 904
895 $echo "set enabled=1 all" > dynamic_printk/modules 905 // enable all 12 messages in the function svc_process()
906 nullarbor:~ # echo -n 'func svc_process +p' >
907 <debugfs>/dynamic_debug/ddebug
896 908
897 Disable all modules: 909 // disable all 12 messages in the function svc_process()
910 nullarbor:~ # echo -n 'func svc_process -p' >
911 <debugfs>/dynamic_debug/ddebug
898 912
899 $echo "set enabled=0 all" > dynamic_printk/modules 913 See Documentation/dynamic-debug-howto.txt for additional information.
900 914
901 Finally, passing "dynamic_printk" at the command line enables 915config DMA_API_DEBUG
902 debugging for all modules. This mode can be turned off via the above 916 bool "Enable debugging of DMA-API usage"
903 disable command. 917 depends on HAVE_DMA_API_DEBUG
918 help
919 Enable this option to debug the use of the DMA API by device drivers.
920 With this option you will be able to detect common bugs in device
921 drivers like double-freeing of DMA mappings or freeing mappings that
922 were never allocated.
923 This option causes a performance degredation. Use only if you want
924 to debug device drivers. If unsure, say N.
904 925
905source "samples/Kconfig" 926source "samples/Kconfig"
906 927