diff options
| author | Dave Hansen <dave@linux.vnet.ibm.com> | 2013-07-01 16:04:46 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 14:25:39 -0400 |
| commit | 6dfc06651b3d29aa07ed99b8075e5d324f7a953a (patch) | |
| tree | e4ae4a93c349456e894da04689a6deaae3063e75 | |
| parent | 881c5149543a3a391ab6ce2ebe70235924f15d9c (diff) | |
consolidate compilation option configs
Original Post:
http://lkml.kernel.org/r/20121214184207.6E00DDEC@kernel.stglabs.ibm.com
Again, trying to come up with some common themes of the stuff in
the kernel hacking menu... There are quite a few options to
tweak compilation in some way, or perform extra compile-time
checks. Give them their own menu.
The diff here looks a bit funny... makes it look like I'm
moving debugfs even though I'm actually moving the options on
either side of it.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | lib/Kconfig.debug | 156 |
1 files changed, 80 insertions, 76 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6fdead79ee15..70dfda31c8aa 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -25,6 +25,34 @@ config DEFAULT_MESSAGE_LOGLEVEL | |||
| 25 | that are auditing their logs closely may want to set it to a lower | 25 | that are auditing their logs closely may want to set it to a lower |
| 26 | priority. | 26 | priority. |
| 27 | 27 | ||
| 28 | menu "Compile-time checks and compiler options" | ||
| 29 | |||
| 30 | config DEBUG_INFO | ||
| 31 | bool "Compile the kernel with debug info" | ||
| 32 | depends on DEBUG_KERNEL | ||
| 33 | help | ||
| 34 | If you say Y here the resulting kernel image will include | ||
| 35 | debugging info resulting in a larger kernel image. | ||
| 36 | This adds debug symbols to the kernel and modules (gcc -g), and | ||
| 37 | is needed if you intend to use kernel crashdump or binary object | ||
| 38 | tools like crash, kgdb, LKCD, gdb, etc on the kernel. | ||
| 39 | Say Y here only if you plan to debug the kernel. | ||
| 40 | |||
| 41 | If unsure, say N. | ||
| 42 | |||
| 43 | config DEBUG_INFO_REDUCED | ||
| 44 | bool "Reduce debugging information" | ||
| 45 | depends on DEBUG_INFO | ||
| 46 | help | ||
| 47 | If you say Y here gcc is instructed to generate less debugging | ||
| 48 | information for structure types. This means that tools that | ||
| 49 | need full debugging information (like kgdb or systemtap) won't | ||
| 50 | be happy. But if you merely need debugging information to | ||
| 51 | resolve line numbers there is no loss. Advantage is that | ||
| 52 | build directory object sizes shrink dramatically over a full | ||
| 53 | DEBUG_INFO build and compile times are reduced too. | ||
| 54 | Only works with newer gcc versions. | ||
| 55 | |||
| 28 | config ENABLE_WARN_DEPRECATED | 56 | config ENABLE_WARN_DEPRECATED |
| 29 | bool "Enable __deprecated logic" | 57 | bool "Enable __deprecated logic" |
| 30 | default y | 58 | default y |
| @@ -52,20 +80,6 @@ config FRAME_WARN | |||
| 52 | Setting it to 0 disables the warning. | 80 | Setting it to 0 disables the warning. |
| 53 | Requires gcc 4.4 | 81 | Requires gcc 4.4 |
| 54 | 82 | ||
| 55 | config MAGIC_SYSRQ | ||
| 56 | bool "Magic SysRq key" | ||
| 57 | depends on !UML | ||
| 58 | help | ||
| 59 | If you say Y here, you will have some control over the system even | ||
| 60 | if the system crashes for example during kernel debugging (e.g., you | ||
| 61 | will be able to flush the buffer cache to disk, reboot the system | ||
| 62 | immediately or dump some status information). This is accomplished | ||
| 63 | by pressing various keys while holding SysRq (Alt+PrintScreen). It | ||
| 64 | also works on a serial console (on PC hardware at least), if you | ||
| 65 | send a BREAK and then within 5 seconds a command keypress. The | ||
| 66 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | ||
| 67 | unless you really know what this hack does. | ||
| 68 | |||
| 69 | config STRIP_ASM_SYMS | 83 | config STRIP_ASM_SYMS |
| 70 | bool "Strip assembler-generated symbols during link" | 84 | bool "Strip assembler-generated symbols during link" |
| 71 | default n | 85 | default n |
| @@ -156,6 +170,58 @@ config DEBUG_SECTION_MISMATCH | |||
| 156 | - Enable verbose reporting from modpost in order to help resolve | 170 | - Enable verbose reporting from modpost in order to help resolve |
| 157 | the section mismatches that are reported. | 171 | the section mismatches that are reported. |
| 158 | 172 | ||
| 173 | # | ||
| 174 | # Select this config option from the architecture Kconfig, if it | ||
| 175 | # is preferred to always offer frame pointers as a config | ||
| 176 | # option on the architecture (regardless of KERNEL_DEBUG): | ||
| 177 | # | ||
| 178 | config ARCH_WANT_FRAME_POINTERS | ||
| 179 | bool | ||
| 180 | help | ||
| 181 | |||
| 182 | config FRAME_POINTER | ||
| 183 | bool "Compile the kernel with frame pointers" | ||
| 184 | depends on DEBUG_KERNEL && \ | ||
| 185 | (CRIS || M68K || FRV || UML || \ | ||
| 186 | AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ | ||
| 187 | ARCH_WANT_FRAME_POINTERS | ||
| 188 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
| 189 | help | ||
| 190 | If you say Y here the resulting kernel image will be slightly | ||
| 191 | larger and slower, but it gives very useful debugging information | ||
| 192 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | ||
| 193 | |||
| 194 | config DEBUG_FORCE_WEAK_PER_CPU | ||
| 195 | bool "Force weak per-cpu definitions" | ||
| 196 | depends on DEBUG_KERNEL | ||
| 197 | help | ||
| 198 | s390 and alpha require percpu variables in modules to be | ||
| 199 | defined weak to work around addressing range issue which | ||
| 200 | puts the following two restrictions on percpu variable | ||
| 201 | definitions. | ||
| 202 | |||
| 203 | 1. percpu symbols must be unique whether static or not | ||
| 204 | 2. percpu variables can't be defined inside a function | ||
| 205 | |||
| 206 | To ensure that generic code follows the above rules, this | ||
| 207 | option forces all percpu variables to be defined as weak. | ||
| 208 | |||
| 209 | endmenu # "Compiler options" | ||
| 210 | |||
| 211 | config MAGIC_SYSRQ | ||
| 212 | bool "Magic SysRq key" | ||
| 213 | depends on !UML | ||
| 214 | help | ||
| 215 | If you say Y here, you will have some control over the system even | ||
| 216 | if the system crashes for example during kernel debugging (e.g., you | ||
| 217 | will be able to flush the buffer cache to disk, reboot the system | ||
| 218 | immediately or dump some status information). This is accomplished | ||
| 219 | by pressing various keys while holding SysRq (Alt+PrintScreen). It | ||
| 220 | also works on a serial console (on PC hardware at least), if you | ||
| 221 | send a BREAK and then within 5 seconds a command keypress. The | ||
| 222 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | ||
| 223 | unless you really know what this hack does. | ||
| 224 | |||
| 159 | config DEBUG_KERNEL | 225 | config DEBUG_KERNEL |
| 160 | bool "Kernel debugging" | 226 | bool "Kernel debugging" |
| 161 | help | 227 | help |
| @@ -816,32 +882,6 @@ config DEBUG_BUGVERBOSE | |||
| 816 | of the BUG call as well as the EIP and oops trace. This aids | 882 | of the BUG call as well as the EIP and oops trace. This aids |
| 817 | debugging but costs about 70-100K of memory. | 883 | debugging but costs about 70-100K of memory. |
| 818 | 884 | ||
| 819 | config DEBUG_INFO | ||
| 820 | bool "Compile the kernel with debug info" | ||
| 821 | depends on DEBUG_KERNEL | ||
| 822 | help | ||
| 823 | If you say Y here the resulting kernel image will include | ||
| 824 | debugging info resulting in a larger kernel image. | ||
| 825 | This adds debug symbols to the kernel and modules (gcc -g), and | ||
| 826 | is needed if you intend to use kernel crashdump or binary object | ||
| 827 | tools like crash, kgdb, LKCD, gdb, etc on the kernel. | ||
| 828 | Say Y here only if you plan to debug the kernel. | ||
| 829 | |||
| 830 | If unsure, say N. | ||
| 831 | |||
| 832 | config DEBUG_INFO_REDUCED | ||
| 833 | bool "Reduce debugging information" | ||
| 834 | depends on DEBUG_INFO | ||
| 835 | help | ||
| 836 | If you say Y here gcc is instructed to generate less debugging | ||
| 837 | information for structure types. This means that tools that | ||
| 838 | need full debugging information (like kgdb or systemtap) won't | ||
| 839 | be happy. But if you merely need debugging information to | ||
| 840 | resolve line numbers there is no loss. Advantage is that | ||
| 841 | build directory object sizes shrink dramatically over a full | ||
| 842 | DEBUG_INFO build and compile times are reduced too. | ||
| 843 | Only works with newer gcc versions. | ||
| 844 | |||
| 845 | config DEBUG_WRITECOUNT | 885 | config DEBUG_WRITECOUNT |
| 846 | bool "Debug filesystem writers count" | 886 | bool "Debug filesystem writers count" |
| 847 | depends on DEBUG_KERNEL | 887 | depends on DEBUG_KERNEL |
| @@ -896,27 +936,6 @@ config DEBUG_CREDENTIALS | |||
| 896 | 936 | ||
| 897 | If unsure, say N. | 937 | If unsure, say N. |
| 898 | 938 | ||
| 899 | # | ||
| 900 | # Select this config option from the architecture Kconfig, if it | ||
| 901 | # is preferred to always offer frame pointers as a config | ||
| 902 | # option on the architecture (regardless of KERNEL_DEBUG): | ||
| 903 | # | ||
| 904 | config ARCH_WANT_FRAME_POINTERS | ||
| 905 | bool | ||
| 906 | help | ||
| 907 | |||
| 908 | config FRAME_POINTER | ||
| 909 | bool "Compile the kernel with frame pointers" | ||
| 910 | depends on DEBUG_KERNEL && \ | ||
| 911 | (CRIS || M68K || FRV || UML || \ | ||
| 912 | AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ | ||
| 913 | ARCH_WANT_FRAME_POINTERS | ||
| 914 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
| 915 | help | ||
| 916 | If you say Y here the resulting kernel image will be slightly | ||
| 917 | larger and slower, but it gives very useful debugging information | ||
| 918 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | ||
| 919 | |||
| 920 | config BOOT_PRINTK_DELAY | 939 | config BOOT_PRINTK_DELAY |
| 921 | bool "Delay each boot printk message by N milliseconds" | 940 | bool "Delay each boot printk message by N milliseconds" |
| 922 | depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY | 941 | depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY |
| @@ -1100,21 +1119,6 @@ config DEBUG_BLOCK_EXT_DEVT | |||
| 1100 | 1119 | ||
| 1101 | Say N if you are unsure. | 1120 | Say N if you are unsure. |
| 1102 | 1121 | ||
| 1103 | config DEBUG_FORCE_WEAK_PER_CPU | ||
| 1104 | bool "Force weak per-cpu definitions" | ||
| 1105 | depends on DEBUG_KERNEL | ||
| 1106 | help | ||
| 1107 | s390 and alpha require percpu variables in modules to be | ||
| 1108 | defined weak to work around addressing range issue which | ||
| 1109 | puts the following two restrictions on percpu variable | ||
| 1110 | definitions. | ||
| 1111 | |||
| 1112 | 1. percpu symbols must be unique whether static or not | ||
| 1113 | 2. percpu variables can't be defined inside a function | ||
| 1114 | |||
| 1115 | To ensure that generic code follows the above rules, this | ||
| 1116 | option forces all percpu variables to be defined as weak. | ||
| 1117 | |||
| 1118 | config NOTIFIER_ERROR_INJECTION | 1122 | config NOTIFIER_ERROR_INJECTION |
| 1119 | tristate "Notifier error injection" | 1123 | tristate "Notifier error injection" |
| 1120 | depends on DEBUG_KERNEL | 1124 | depends on DEBUG_KERNEL |
