|
| 1 | +menu "printk and dmesg options" |
1 | 2 |
|
2 | 3 | config PRINTK_TIME
|
3 | 4 | bool "Show timing information on printks"
|
@@ -25,6 +26,95 @@ config DEFAULT_MESSAGE_LOGLEVEL
|
25 | 26 | that are auditing their logs closely may want to set it to a lower
|
26 | 27 | priority.
|
27 | 28 |
|
| 29 | +config BOOT_PRINTK_DELAY |
| 30 | + bool "Delay each boot printk message by N milliseconds" |
| 31 | + depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY |
| 32 | + help |
| 33 | + This build option allows you to read kernel boot messages |
| 34 | + by inserting a short delay after each one. The delay is |
| 35 | + specified in milliseconds on the kernel command line, |
| 36 | + using "boot_delay=N". |
| 37 | + |
| 38 | + It is likely that you would also need to use "lpj=M" to preset |
| 39 | + the "loops per jiffie" value. |
| 40 | + See a previous boot log for the "lpj" value to use for your |
| 41 | + system, and then set "lpj=M" before setting "boot_delay=N". |
| 42 | + NOTE: Using this option may adversely affect SMP systems. |
| 43 | + I.e., processors other than the first one may not boot up. |
| 44 | + BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect |
| 45 | + what it believes to be lockup conditions. |
| 46 | + |
| 47 | +config DYNAMIC_DEBUG |
| 48 | + bool "Enable dynamic printk() support" |
| 49 | + default n |
| 50 | + depends on PRINTK |
| 51 | + depends on DEBUG_FS |
| 52 | + help |
| 53 | + |
| 54 | + Compiles debug level messages into the kernel, which would not |
| 55 | + otherwise be available at runtime. These messages can then be |
| 56 | + enabled/disabled based on various levels of scope - per source file, |
| 57 | + function, module, format string, and line number. This mechanism |
| 58 | + implicitly compiles in all pr_debug() and dev_dbg() calls, which |
| 59 | + enlarges the kernel text size by about 2%. |
| 60 | + |
| 61 | + If a source file is compiled with DEBUG flag set, any |
| 62 | + pr_debug() calls in it are enabled by default, but can be |
| 63 | + disabled at runtime as below. Note that DEBUG flag is |
| 64 | + turned on by many CONFIG_*DEBUG* options. |
| 65 | + |
| 66 | + Usage: |
| 67 | + |
| 68 | + Dynamic debugging is controlled via the 'dynamic_debug/control' file, |
| 69 | + which is contained in the 'debugfs' filesystem. Thus, the debugfs |
| 70 | + filesystem must first be mounted before making use of this feature. |
| 71 | + We refer the control file as: <debugfs>/dynamic_debug/control. This |
| 72 | + file contains a list of the debug statements that can be enabled. The |
| 73 | + format for each line of the file is: |
| 74 | + |
| 75 | + filename:lineno [module]function flags format |
| 76 | + |
| 77 | + filename : source file of the debug statement |
| 78 | + lineno : line number of the debug statement |
| 79 | + module : module that contains the debug statement |
| 80 | + function : function that contains the debug statement |
| 81 | + flags : '=p' means the line is turned 'on' for printing |
| 82 | + format : the format used for the debug statement |
| 83 | + |
| 84 | + From a live system: |
| 85 | + |
| 86 | + nullarbor:~ # cat <debugfs>/dynamic_debug/control |
| 87 | + # filename:lineno [module]function flags format |
| 88 | + fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" |
| 89 | + fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" |
| 90 | + fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" |
| 91 | + |
| 92 | + Example usage: |
| 93 | + |
| 94 | + // enable the message at line 1603 of file svcsock.c |
| 95 | + nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > |
| 96 | + <debugfs>/dynamic_debug/control |
| 97 | + |
| 98 | + // enable all the messages in file svcsock.c |
| 99 | + nullarbor:~ # echo -n 'file svcsock.c +p' > |
| 100 | + <debugfs>/dynamic_debug/control |
| 101 | + |
| 102 | + // enable all the messages in the NFS server module |
| 103 | + nullarbor:~ # echo -n 'module nfsd +p' > |
| 104 | + <debugfs>/dynamic_debug/control |
| 105 | + |
| 106 | + // enable all 12 messages in the function svc_process() |
| 107 | + nullarbor:~ # echo -n 'func svc_process +p' > |
| 108 | + <debugfs>/dynamic_debug/control |
| 109 | + |
| 110 | + // disable all 12 messages in the function svc_process() |
| 111 | + nullarbor:~ # echo -n 'func svc_process -p' > |
| 112 | + <debugfs>/dynamic_debug/control |
| 113 | + |
| 114 | + See Documentation/dynamic-debug-howto.txt for additional information. |
| 115 | + |
| 116 | +endmenu # "printk and dmesg options" |
| 117 | + |
28 | 118 | menu "Compile-time checks and compiler options"
|
29 | 119 |
|
30 | 120 | config DEBUG_INFO
|
@@ -940,24 +1030,6 @@ config DEBUG_CREDENTIALS
|
940 | 1030 |
|
941 | 1031 | If unsure, say N.
|
942 | 1032 |
|
943 |
| -config BOOT_PRINTK_DELAY |
944 |
| - bool "Delay each boot printk message by N milliseconds" |
945 |
| - depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY |
946 |
| - help |
947 |
| - This build option allows you to read kernel boot messages |
948 |
| - by inserting a short delay after each one. The delay is |
949 |
| - specified in milliseconds on the kernel command line, |
950 |
| - using "boot_delay=N". |
951 |
| - |
952 |
| - It is likely that you would also need to use "lpj=M" to preset |
953 |
| - the "loops per jiffie" value. |
954 |
| - See a previous boot log for the "lpj" value to use for your |
955 |
| - system, and then set "lpj=M" before setting "boot_delay=N". |
956 |
| - NOTE: Using this option may adversely affect SMP systems. |
957 |
| - I.e., processors other than the first one may not boot up. |
958 |
| - BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect |
959 |
| - what it believes to be lockup conditions. |
960 |
| - |
961 | 1033 | menu "RCU Debugging"
|
962 | 1034 |
|
963 | 1035 | config PROVE_RCU
|
@@ -1441,75 +1513,6 @@ config BUILD_DOCSRC
|
1441 | 1513 |
|
1442 | 1514 | Say N if you are unsure.
|
1443 | 1515 |
|
1444 |
| -config DYNAMIC_DEBUG |
1445 |
| - bool "Enable dynamic printk() support" |
1446 |
| - default n |
1447 |
| - depends on PRINTK |
1448 |
| - depends on DEBUG_FS |
1449 |
| - help |
1450 |
| - |
1451 |
| - Compiles debug level messages into the kernel, which would not |
1452 |
| - otherwise be available at runtime. These messages can then be |
1453 |
| - enabled/disabled based on various levels of scope - per source file, |
1454 |
| - function, module, format string, and line number. This mechanism |
1455 |
| - implicitly compiles in all pr_debug() and dev_dbg() calls, which |
1456 |
| - enlarges the kernel text size by about 2%. |
1457 |
| - |
1458 |
| - If a source file is compiled with DEBUG flag set, any |
1459 |
| - pr_debug() calls in it are enabled by default, but can be |
1460 |
| - disabled at runtime as below. Note that DEBUG flag is |
1461 |
| - turned on by many CONFIG_*DEBUG* options. |
1462 |
| - |
1463 |
| - Usage: |
1464 |
| - |
1465 |
| - Dynamic debugging is controlled via the 'dynamic_debug/control' file, |
1466 |
| - which is contained in the 'debugfs' filesystem. Thus, the debugfs |
1467 |
| - filesystem must first be mounted before making use of this feature. |
1468 |
| - We refer the control file as: <debugfs>/dynamic_debug/control. This |
1469 |
| - file contains a list of the debug statements that can be enabled. The |
1470 |
| - format for each line of the file is: |
1471 |
| - |
1472 |
| - filename:lineno [module]function flags format |
1473 |
| - |
1474 |
| - filename : source file of the debug statement |
1475 |
| - lineno : line number of the debug statement |
1476 |
| - module : module that contains the debug statement |
1477 |
| - function : function that contains the debug statement |
1478 |
| - flags : '=p' means the line is turned 'on' for printing |
1479 |
| - format : the format used for the debug statement |
1480 |
| - |
1481 |
| - From a live system: |
1482 |
| - |
1483 |
| - nullarbor:~ # cat <debugfs>/dynamic_debug/control |
1484 |
| - # filename:lineno [module]function flags format |
1485 |
| - fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" |
1486 |
| - fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" |
1487 |
| - fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" |
1488 |
| - |
1489 |
| - Example usage: |
1490 |
| - |
1491 |
| - // enable the message at line 1603 of file svcsock.c |
1492 |
| - nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > |
1493 |
| - <debugfs>/dynamic_debug/control |
1494 |
| - |
1495 |
| - // enable all the messages in file svcsock.c |
1496 |
| - nullarbor:~ # echo -n 'file svcsock.c +p' > |
1497 |
| - <debugfs>/dynamic_debug/control |
1498 |
| - |
1499 |
| - // enable all the messages in the NFS server module |
1500 |
| - nullarbor:~ # echo -n 'module nfsd +p' > |
1501 |
| - <debugfs>/dynamic_debug/control |
1502 |
| - |
1503 |
| - // enable all 12 messages in the function svc_process() |
1504 |
| - nullarbor:~ # echo -n 'func svc_process +p' > |
1505 |
| - <debugfs>/dynamic_debug/control |
1506 |
| - |
1507 |
| - // disable all 12 messages in the function svc_process() |
1508 |
| - nullarbor:~ # echo -n 'func svc_process -p' > |
1509 |
| - <debugfs>/dynamic_debug/control |
1510 |
| - |
1511 |
| - See Documentation/dynamic-debug-howto.txt for additional information. |
1512 |
| - |
1513 | 1516 | config DMA_API_DEBUG
|
1514 | 1517 | bool "Enable debugging of DMA-API usage"
|
1515 | 1518 | depends on HAVE_DMA_API_DEBUG
|
|
0 commit comments