diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-28 18:05:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-28 18:05:50 -0400 |
commit | b0d44c0dbbd52effb731b1c0af9afd56215c48de (patch) | |
tree | 3237c0087d91a5390aed05689b9f610ba16fa116 /lib/Kconfig.debug | |
parent | 9537a48ed4b9e4b738943d6da0a0fd4278adf905 (diff) | |
parent | 7c730ccdc1188b97f5c8cb690906242c7ed75c22 (diff) |
Merge branch 'linus' into core/iommu
Conflicts:
arch/x86/Kconfig
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 74 |
1 files changed, 42 insertions, 32 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d9cbada7e2f8..251fa7ba3014 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -847,60 +847,70 @@ config BUILD_DOCSRC | |||
847 | 847 | ||
848 | Say N if you are unsure. | 848 | Say N if you are unsure. |
849 | 849 | ||
850 | config DYNAMIC_PRINTK_DEBUG | 850 | config 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" |
888 | fs/aio.c:248 [aio]ioctx_alloc - "ENOMEM:\040nr_events\040too\040high\012" | ||
889 | fs/aio.c:1770 [aio]sys_io_cancel - "calling\040cancel\012" | ||
884 | 890 | ||
885 | Enable a module: | 891 | Example usage: |
886 | 892 | ||
887 | $echo "set enabled=1 <module_name>" > dynamic_printk/modules | 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 | ||
888 | 896 | ||
889 | Disable a module: | 897 | // enable all the messages in file svcsock.c |
898 | nullarbor:~ # echo -n 'file svcsock.c +p' > | ||
899 | <debugfs>/dynamic_debug/ddebug | ||
890 | 900 | ||
891 | $echo "set enabled=0 <module_name>" > dynamic_printk/modules | 901 | // enable all the messages in the NFS server module |
902 | nullarbor:~ # echo -n 'module nfsd +p' > | ||
903 | <debugfs>/dynamic_debug/ddebug | ||
892 | 904 | ||
893 | Enable all modules: | 905 | // enable all 12 messages in the function svc_process() |
906 | nullarbor:~ # echo -n 'func svc_process +p' > | ||
907 | <debugfs>/dynamic_debug/ddebug | ||
894 | 908 | ||
895 | $echo "set enabled=1 all" > dynamic_printk/modules | 909 | // disable all 12 messages in the function svc_process() |
910 | nullarbor:~ # echo -n 'func svc_process -p' > | ||
911 | <debugfs>/dynamic_debug/ddebug | ||
896 | 912 | ||
897 | Disable all modules: | 913 | See Documentation/dynamic-debug-howto.txt for additional information. |
898 | |||
899 | $echo "set enabled=0 all" > dynamic_printk/modules | ||
900 | |||
901 | Finally, passing "dynamic_printk" at the command line enables | ||
902 | debugging for all modules. This mode can be turned off via the above | ||
903 | disable command. | ||
904 | 914 | ||
905 | config DMA_API_DEBUG | 915 | config DMA_API_DEBUG |
906 | bool "Enable debugging of DMA-API usage" | 916 | bool "Enable debugging of DMA-API usage" |