Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Combine instrumentation menus in kernel/Kconfig.instrumentation

Quoting Randy:

"It seems sad that this patch sources Kconfig.marker, a 7-line file,
20-something times. Yes, you (we) don't want to put those 7 lines into
20-something different files, so sourcing is the right thing.

However, what you did for avr32 seems more on the right track to me: make
_one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES,
and MARKERS and then use (source) that in all of the arches."

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mathieu Desnoyers and committed by
Linus Torvalds
09cadedb 1c3f0b8e

+73 -420
+1 -1
arch/alpha/Kconfig
··· 654 654 655 655 source "fs/Kconfig" 656 656 657 - source "arch/alpha/oprofile/Kconfig" 657 + source "kernel/Kconfig.instrumentation" 658 658 659 659 source "arch/alpha/Kconfig.debug" 660 660
-23
arch/alpha/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - endmenu 23 -
+1 -1
arch/arm/Kconfig
··· 1068 1068 1069 1069 source "fs/Kconfig" 1070 1070 1071 - source "arch/arm/oprofile/Kconfig" 1071 + source "kernel/Kconfig.instrumentation" 1072 1072 1073 1073 source "arch/arm/Kconfig.debug" 1074 1074
-42
arch/arm/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - if OPROFILE 23 - 24 - config OPROFILE_ARMV6 25 - bool 26 - depends on CPU_V6 && !SMP 27 - default y 28 - select OPROFILE_ARM11_CORE 29 - 30 - config OPROFILE_MPCORE 31 - bool 32 - depends on CPU_V6 && SMP 33 - default y 34 - select OPROFILE_ARM11_CORE 35 - 36 - config OPROFILE_ARM11_CORE 37 - bool 38 - 39 - endif 40 - 41 - endmenu 42 -
+1 -1
arch/blackfin/Kconfig
··· 1012 1012 1013 1013 source "fs/Kconfig" 1014 1014 1015 - source "arch/blackfin/oprofile/Kconfig" 1015 + source "kernel/Kconfig.instrumentation" 1016 1016 1017 1017 menu "Kernel hacking" 1018 1018
-29
arch/blackfin/oprofile/Kconfig
··· 1 - menu "Profiling support" 2 - depends on EXPERIMENTAL 3 - 4 - config PROFILING 5 - bool "Profiling support (EXPERIMENTAL)" 6 - help 7 - Say Y here to enable the extended profiling support mechanisms used 8 - by profilers such as OProfile. 9 - 10 - config OPROFILE 11 - tristate "OProfile system profiling (EXPERIMENTAL)" 12 - depends on PROFILING 13 - help 14 - OProfile is a profiling system capable of profiling the 15 - whole system, include the kernel, kernel modules, libraries, 16 - and applications. 17 - 18 - If unsure, say N. 19 - 20 - config HARDWARE_PM 21 - tristate "Hardware Performance Monitor Profiling" 22 - depends on PROFILING 23 - help 24 - take use of hardware performance monitor to profiling the kernel 25 - and application. 26 - 27 - If unsure, say N. 28 - 29 - endmenu
+2
arch/cris/Kconfig
··· 196 196 197 197 source "drivers/usb/Kconfig" 198 198 199 + source "kernel/Kconfig.instrumentation" 200 + 199 201 source "arch/cris/Kconfig.debug" 200 202 201 203 source "security/Kconfig"
+2
arch/frv/Kconfig
··· 375 375 376 376 source "fs/Kconfig" 377 377 378 + source "kernel/Kconfig.instrumentation" 379 + 378 380 source "arch/frv/Kconfig.debug" 379 381 380 382 source "security/Kconfig"
+2
arch/h8300/Kconfig
··· 223 223 224 224 source "fs/Kconfig" 225 225 226 + source "kernel/Kconfig.instrumentation" 227 + 226 228 source "arch/h8300/Kconfig.debug" 227 229 228 230 source "security/Kconfig"
-25
arch/i386/Kconfig
··· 1256 1256 1257 1257 source "fs/Kconfig" 1258 1258 1259 - menuconfig INSTRUMENTATION 1260 - bool "Instrumentation Support" 1261 - default y 1262 - ---help--- 1263 - Say Y here to get to see options related to performance measurement, 1264 - debugging, and testing. This option alone does not add any kernel code. 1265 - 1266 - If you say N, all options in this submenu will be skipped and disabled. 1267 - 1268 - if INSTRUMENTATION 1269 - 1270 - source "arch/x86/oprofile/Kconfig" 1271 - 1272 - config KPROBES 1273 - bool "Kprobes" 1274 - depends on KALLSYMS && MODULES 1275 - help 1276 - Kprobes allows you to trap at almost any kernel address and 1277 - execute a callback function. register_kprobe() establishes 1278 - a probepoint and specifies the callback. Kprobes is useful 1279 - for kernel debugging, non-intrusive instrumentation and testing. 1280 - If in doubt, say "N". 1281 - 1282 - endif # INSTRUMENTATION 1283 - 1284 1259 source "arch/i386/Kconfig.debug" 1285 1260 1286 1261 source "security/Kconfig"
+1 -14
arch/ia64/Kconfig
··· 592 592 593 593 source "arch/ia64/hp/sim/Kconfig" 594 594 595 - menu "Instrumentation Support" 596 - 597 - source "arch/ia64/oprofile/Kconfig" 598 - 599 - config KPROBES 600 - bool "Kprobes" 601 - depends on KALLSYMS && MODULES 602 - help 603 - Kprobes allows you to trap at almost any kernel address and 604 - execute a callback function. register_kprobe() establishes 605 - a probepoint and specifies the callback. Kprobes is useful 606 - for kernel debugging, non-intrusive instrumentation and testing. 607 - If in doubt, say "N". 608 - endmenu 595 + source "kernel/Kconfig.instrumentation" 609 596 610 597 source "arch/ia64/Kconfig.debug" 611 598
-20
arch/ia64/oprofile/Kconfig
··· 1 - config PROFILING 2 - bool "Profiling support (EXPERIMENTAL)" 3 - help 4 - Say Y here to enable the extended profiling support mechanisms used 5 - by profilers such as OProfile. 6 - 7 - config OPROFILE 8 - tristate "OProfile system profiling (EXPERIMENTAL)" 9 - depends on PROFILING 10 - help 11 - OProfile is a profiling system capable of profiling the 12 - whole system, include the kernel, kernel modules, libraries, 13 - and applications. 14 - 15 - Due to firmware bugs, you may need to use the "nohalt" boot 16 - option if you're using OProfile with the hardware performance 17 - counters. 18 - 19 - If unsure, say N. 20 -
+1 -1
arch/m32r/Kconfig
··· 426 426 427 427 source "fs/Kconfig" 428 428 429 - source "arch/m32r/oprofile/Kconfig" 429 + source "kernel/Kconfig.instrumentation" 430 430 431 431 source "arch/m32r/Kconfig.debug" 432 432
-23
arch/m32r/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - endmenu 23 -
+2
arch/m68k/Kconfig
··· 683 683 684 684 source "fs/Kconfig" 685 685 686 + source "kernel/Kconfig.instrumentation" 687 + 686 688 source "arch/m68k/Kconfig.debug" 687 689 688 690 source "security/Kconfig"
+2
arch/m68knommu/Kconfig
··· 696 696 697 697 source "fs/Kconfig" 698 698 699 + source "kernel/Kconfig.instrumentation" 700 + 699 701 source "arch/m68knommu/Kconfig.debug" 700 702 701 703 source "security/Kconfig"
+1 -1
arch/mips/Kconfig
··· 2005 2005 2006 2006 source "fs/Kconfig" 2007 2007 2008 - source "arch/mips/oprofile/Kconfig" 2008 + source "kernel/Kconfig.instrumentation" 2009 2009 2010 2010 source "arch/mips/Kconfig.debug" 2011 2011
-23
arch/mips/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING && !MIPS_MT_SMTC && EXPERIMENTAL 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - endmenu 23 -
+1 -1
arch/parisc/Kconfig
··· 267 267 268 268 source "fs/Kconfig" 269 269 270 - source "arch/parisc/oprofile/Kconfig" 270 + source "kernel/Kconfig.instrumentation" 271 271 272 272 source "arch/parisc/Kconfig.debug" 273 273
-23
arch/parisc/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - endmenu 23 -
+1 -14
arch/powerpc/Kconfig
··· 669 669 670 670 source "lib/Kconfig" 671 671 672 - menu "Instrumentation Support" 673 - 674 - source "arch/powerpc/oprofile/Kconfig" 675 - 676 - config KPROBES 677 - bool "Kprobes" 678 - depends on !BOOKE && !4xx && KALLSYMS && MODULES 679 - help 680 - Kprobes allows you to trap at almost any kernel address and 681 - execute a callback function. register_kprobe() establishes 682 - a probepoint and specifies the callback. Kprobes is useful 683 - for kernel debugging, non-intrusive instrumentation and testing. 684 - If in doubt, say "N". 685 - endmenu 672 + source "kernel/Kconfig.instrumentation" 686 673 687 674 source "arch/powerpc/Kconfig.debug" 688 675
-24
arch/powerpc/oprofile/Kconfig
··· 1 - config PROFILING 2 - bool "Profiling support (EXPERIMENTAL)" 3 - help 4 - Say Y here to enable the extended profiling support mechanisms used 5 - by profilers such as OProfile. 6 - 7 - 8 - config OPROFILE 9 - tristate "OProfile system profiling (EXPERIMENTAL)" 10 - depends on PROFILING 11 - help 12 - OProfile is a profiling system capable of profiling the 13 - whole system, include the kernel, kernel modules, libraries, 14 - and applications. 15 - 16 - If unsure, say N. 17 - 18 - config OPROFILE_CELL 19 - bool "OProfile for Cell Broadband Engine" 20 - depends on (SPU_FS = y && OPROFILE = m) || (SPU_FS = y && OPROFILE = y) || (SPU_FS = m && OPROFILE = m) 21 - default y 22 - help 23 - Profiling of Cell BE SPUs requires special support enabled 24 - by this option.
+1 -1
arch/ppc/Kconfig
··· 1317 1317 1318 1318 source "lib/Kconfig" 1319 1319 1320 - source "arch/powerpc/oprofile/Kconfig" 1320 + source "kernel/Kconfig.instrumentation" 1321 1321 1322 1322 source "arch/ppc/Kconfig.debug" 1323 1323
+1 -15
arch/s390/Kconfig
··· 529 529 530 530 source "fs/Kconfig" 531 531 532 - menu "Instrumentation Support" 533 - 534 - source "arch/s390/oprofile/Kconfig" 535 - 536 - config KPROBES 537 - bool "Kprobes (EXPERIMENTAL)" 538 - depends on EXPERIMENTAL && MODULES 539 - help 540 - Kprobes allows you to trap at almost any kernel address and 541 - execute a callback function. register_kprobe() establishes 542 - a probepoint and specifies the callback. Kprobes is useful 543 - for kernel debugging, non-intrusive instrumentation and testing. 544 - If in doubt, say "N". 545 - 546 - endmenu 532 + source "kernel/Kconfig.instrumentation" 547 533 548 534 source "arch/s390/Kconfig.debug" 549 535
-22
arch/s390/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - 4 - config PROFILING 5 - bool "Profiling support" 6 - help 7 - Say Y here to enable profiling support mechanisms used by 8 - profilers such as readprofile or OProfile. 9 - 10 - 11 - config OPROFILE 12 - tristate "OProfile system profiling" 13 - depends on PROFILING 14 - help 15 - OProfile is a profiling system capable of profiling the 16 - whole system, include the kernel, kernel modules, libraries, 17 - and applications. 18 - 19 - If unsure, say N. 20 - 21 - endmenu 22 -
+1 -1
arch/sh/Kconfig
··· 758 758 759 759 source "fs/Kconfig" 760 760 761 - source "arch/sh/oprofile/Kconfig" 761 + source "kernel/Kconfig.instrumentation" 762 762 763 763 source "arch/sh/Kconfig.debug" 764 764
-23
arch/sh/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - endmenu 23 -
+1 -1
arch/sh64/Kconfig
··· 284 284 285 285 source "fs/Kconfig" 286 286 287 - source "arch/sh64/oprofile/Kconfig" 287 + source "kernel/Kconfig.instrumentation" 288 288 289 289 source "arch/sh64/Kconfig.debug" 290 290
-23
arch/sh64/oprofile/Kconfig
··· 1 - 2 - menu "Profiling support" 3 - depends on EXPERIMENTAL 4 - 5 - config PROFILING 6 - bool "Profiling support (EXPERIMENTAL)" 7 - help 8 - Say Y here to enable the extended profiling support mechanisms used 9 - by profilers such as OProfile. 10 - 11 - 12 - config OPROFILE 13 - tristate "OProfile system profiling (EXPERIMENTAL)" 14 - depends on PROFILING 15 - help 16 - OProfile is a profiling system capable of profiling the 17 - whole system, include the kernel, kernel modules, libraries, 18 - and applications. 19 - 20 - If unsure, say N. 21 - 22 - endmenu 23 -
+1 -5
arch/sparc/Kconfig
··· 320 320 321 321 source "fs/Kconfig" 322 322 323 - menu "Instrumentation Support" 324 - 325 - source "arch/sparc/oprofile/Kconfig" 326 - 327 - endmenu 323 + source "kernel/Kconfig.instrumentation" 328 324 329 325 source "arch/sparc/Kconfig.debug" 330 326
-17
arch/sparc/oprofile/Kconfig
··· 1 - config PROFILING 2 - bool "Profiling support (EXPERIMENTAL)" 3 - help 4 - Say Y here to enable the extended profiling support mechanisms used 5 - by profilers such as OProfile. 6 - 7 - 8 - config OPROFILE 9 - tristate "OProfile system profiling (EXPERIMENTAL)" 10 - depends on PROFILING 11 - help 12 - OProfile is a profiling system capable of profiling the 13 - whole system, include the kernel, kernel modules, libraries, 14 - and applications. 15 - 16 - If unsure, say N. 17 -
+1 -14
arch/sparc64/Kconfig
··· 460 460 461 461 source "fs/Kconfig" 462 462 463 - menu "Instrumentation Support" 464 - 465 - source "arch/sparc64/oprofile/Kconfig" 466 - 467 - config KPROBES 468 - bool "Kprobes (EXPERIMENTAL)" 469 - depends on KALLSYMS && EXPERIMENTAL && MODULES 470 - help 471 - Kprobes allows you to trap at almost any kernel address and 472 - execute a callback function. register_kprobe() establishes 473 - a probepoint and specifies the callback. Kprobes is useful 474 - for kernel debugging, non-intrusive instrumentation and testing. 475 - If in doubt, say "N". 476 - endmenu 463 + source "kernel/Kconfig.instrumentation" 477 464 478 465 source "arch/sparc64/Kconfig.debug" 479 466
-17
arch/sparc64/oprofile/Kconfig
··· 1 - config PROFILING 2 - bool "Profiling support (EXPERIMENTAL)" 3 - help 4 - Say Y here to enable the extended profiling support mechanisms used 5 - by profilers such as OProfile. 6 - 7 - 8 - config OPROFILE 9 - tristate "OProfile system profiling (EXPERIMENTAL)" 10 - depends on PROFILING 11 - help 12 - OProfile is a profiling system capable of profiling the 13 - whole system, include the kernel, kernel modules, libraries, 14 - and applications. 15 - 16 - If unsure, say N. 17 -
+2
arch/um/Kconfig
··· 289 289 bool 290 290 default n 291 291 292 + source "kernel/Kconfig.instrumentation" 293 + 292 294 source "arch/um/Kconfig.debug"
+2
arch/v850/Kconfig
··· 331 331 332 332 source "drivers/usb/Kconfig" 333 333 334 + source "kernel/Kconfig.instrumentation" 335 + 334 336 source "arch/v850/Kconfig.debug" 335 337 336 338 source "security/Kconfig"
-15
arch/x86_64/Kconfig
··· 799 799 800 800 source fs/Kconfig 801 801 802 - menu "Instrumentation Support" 803 - 804 - source "arch/x86/oprofile/Kconfig" 805 - 806 - config KPROBES 807 - bool "Kprobes" 808 - depends on KALLSYMS && MODULES 809 - help 810 - Kprobes allows you to trap at almost any kernel address and 811 - execute a callback function. register_kprobe() establishes 812 - a probepoint and specifies the callback. Kprobes is useful 813 - for kernel debugging, non-intrusive instrumentation and testing. 814 - If in doubt, say "N". 815 - endmenu 816 - 817 802 source "arch/x86_64/Kconfig.debug" 818 803 819 804 source "security/Kconfig"
+2
arch/xtensa/Kconfig
··· 251 251 provide one yourself. 252 252 endmenu 253 253 254 + source "kernel/Kconfig.instrumentation" 255 + 254 256 source "arch/xtensa/Kconfig.debug" 255 257 256 258 source "security/Kconfig"
+43
kernel/Kconfig.instrumentation
··· 1 + menuconfig INSTRUMENTATION 2 + bool "Instrumentation Support" 3 + default y 4 + ---help--- 5 + Say Y here to get to see options related to performance measurement, 6 + system-wide debugging, and testing. This option alone does not add any 7 + kernel code. 8 + 9 + If you say N, all options in this submenu will be skipped and 10 + disabled. If you're trying to debug the kernel itself, go see the 11 + Kernel Hacking menu. 12 + 13 + if INSTRUMENTATION 14 + 15 + config PROFILING 16 + bool "Profiling support (EXPERIMENTAL)" 17 + help 18 + Say Y here to enable the extended profiling support mechanisms used 19 + by profilers such as OProfile. 20 + 21 + config OPROFILE 22 + tristate "OProfile system profiling (EXPERIMENTAL)" 23 + depends on PROFILING 24 + depends on ALPHA || ARM || BLACKFIN || X86_32 || IA64 || M32R || MIPS || PARISC || PPC || S390 || SUPERH || SPARC || X86_64 25 + help 26 + OProfile is a profiling system capable of profiling the 27 + whole system, include the kernel, kernel modules, libraries, 28 + and applications. 29 + 30 + If unsure, say N. 31 + 32 + config KPROBES 33 + bool "Kprobes" 34 + depends on KALLSYMS && MODULES 35 + depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 36 + help 37 + Kprobes allows you to trap at almost any kernel address and 38 + execute a callback function. register_kprobe() establishes 39 + a probepoint and specifies the callback. Kprobes is useful 40 + for kernel debugging, non-intrusive instrumentation and testing. 41 + If in doubt, say "N". 42 + 43 + endif # INSTRUMENTATION