From c0ffa3a951668734a635cd1e26bf7583795854c5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:32 -0500 Subject: Fix ARM to play nicely with generic Instrumentation menu The conflicting commit for move-kconfiginstrumentation-to-arch-kconfig-and-init-kconfig.patch is the ARM fix from Linus : commit 38ad9aebe70dc72df08851bbd1620d89329129ba He just seemed to agree that my approach (just putting the missing ARM config options in arch/arm/Kconfig) works too. The main advantage it has is that it is smaller, does not need a cleanup in the future and does not break the following patches unnecessarily. It's just been discussed here http://lkml.org/lkml/2008/1/15/267 However, Linus might prefer to stay with his own patch and I would totally understand it that late in the release cycle. Therefore I submit this for the next release cycle. Signed-off-by: Mathieu Desnoyers Cc: Jeff Dike Cc: David Howells Cc: Ananth N Mavinakayanahalli CC: Russell King Signed-off-by: Sam Ravnborg --- kernel/Kconfig.instrumentation | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation index 468f47ad7503..a00dcb610233 100644 --- a/kernel/Kconfig.instrumentation +++ b/kernel/Kconfig.instrumentation @@ -32,7 +32,7 @@ config OPROFILE config KPROBES bool "Kprobes" depends on KALLSYMS && MODULES && !UML - depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 + depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 || (ARM && !XIP_KERNEL) help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes -- cgit v1.2.3 From 42d4b839c82fd7dd8e412145eb6d9752468478e2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:34 -0500 Subject: Add HAVE_OPROFILE Linus: On the per-architecture side, I do think it would be better to *not* have internal architecture knowledge in a generic file, and as such a line like depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 really shouldn't exist in a file like kernel/Kconfig.instrumentation. It would be much better to do depends on ARCH_SUPPORTS_KPROBES in that generic file, and then architectures that do support it would just have a bool ARCH_SUPPORTS_KPROBES default y in *their* architecture files. That would seem to be much more logical, and is readable both for arch maintainers *and* for people who have no clue - and don't care - about which architecture is supposed to support which interface... Changelog: Actually, I know I gave this as the magic incantation, but now that I see it, I realize that I should have told you to just use config ARCH_SUPPORTS_KPROBES def_bool y instead, which is a bit denser. We seem to use both kinds of syntax for these things, but this is really what "def_bool" is there for... Changelog : - Moving to HAVE_*. - Add AVR32 oprofile. Signed-off-by: Mathieu Desnoyers Cc: Andrew Morton Cc: Haavard Skinnemoen Cc: David Howells Cc: Jeff Dike Cc: Ananth N Mavinakayanahalli Signed-off-by: Sam Ravnborg --- kernel/Kconfig.instrumentation | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation index a00dcb610233..d9d010a271db 100644 --- a/kernel/Kconfig.instrumentation +++ b/kernel/Kconfig.instrumentation @@ -21,7 +21,7 @@ config PROFILING config OPROFILE tristate "OProfile system profiling (EXPERIMENTAL)" depends on PROFILING && !UML - depends on ARCH_SUPPORTS_OPROFILE || ALPHA || ARM || BLACKFIN || IA64 || M32R || PARISC || PPC || S390 || SUPERH || SPARC + depends on HAVE_OPROFILE help OProfile is a profiling system capable of profiling the whole system, include the kernel, kernel modules, libraries, @@ -29,6 +29,9 @@ config OPROFILE If unsure, say N. +config HAVE_OPROFILE + def_bool n + config KPROBES bool "Kprobes" depends on KALLSYMS && MODULES && !UML -- cgit v1.2.3 From 3f550096dede4430f83b16457da83bf429155ac2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:35 -0500 Subject: Add HAVE_KPROBES Linus: On the per-architecture side, I do think it would be better to *not* have internal architecture knowledge in a generic file, and as such a line like depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 really shouldn't exist in a file like kernel/Kconfig.instrumentation. It would be much better to do depends on ARCH_SUPPORTS_KPROBES in that generic file, and then architectures that do support it would just have a bool ARCH_SUPPORTS_KPROBES default y in *their* architecture files. That would seem to be much more logical, and is readable both for arch maintainers *and* for people who have no clue - and don't care - about which architecture is supposed to support which interface... Changelog: Actually, I know I gave this as the magic incantation, but now that I see it, I realize that I should have told you to just use config KPROBES_SUPPORT def_bool y instead, which is a bit denser. We seem to use both kinds of syntax for these things, but this is really what "def_bool" is there for... - Use HAVE_KPROBES - Use a select - Yet another update : Moving to HAVE_* now. - Update ARM for kprobes support. Signed-off-by: Mathieu Desnoyers Cc: Jeff Dike Cc: David Howells Cc: Ananth N Mavinakayanahalli Signed-off-by: Sam Ravnborg --- kernel/Kconfig.instrumentation | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation index d9d010a271db..2195b6544575 100644 --- a/kernel/Kconfig.instrumentation +++ b/kernel/Kconfig.instrumentation @@ -35,7 +35,7 @@ config HAVE_OPROFILE config KPROBES bool "Kprobes" depends on KALLSYMS && MODULES && !UML - depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 || (ARM && !XIP_KERNEL) + depends on HAVE_KPROBES help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes @@ -43,6 +43,9 @@ config KPROBES for kernel debugging, non-intrusive instrumentation and testing. If in doubt, say "N". +config HAVE_KPROBES + def_bool n + config MARKERS bool "Activate markers" help -- cgit v1.2.3 From 125e564582cbce6219397fc64556438420efae4c Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:36 -0500 Subject: Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig Move the instrumentation Kconfig to arch/Kconfig for architecture dependent options - oprofile - kprobes and init/Kconfig for architecture independent options - profiling - markers Remove the "Instrumentation Support" menu. Everything moves to "General setup". Delete the kernel/Kconfig.instrumentation file. Signed-off-by: Mathieu Desnoyers Cc: Linus Torvalds Cc: Signed-off-by: Sam Ravnborg --- kernel/Kconfig.instrumentation | 55 ------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 kernel/Kconfig.instrumentation (limited to 'kernel') diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation deleted file mode 100644 index 2195b6544575..000000000000 --- a/kernel/Kconfig.instrumentation +++ /dev/null @@ -1,55 +0,0 @@ -menuconfig INSTRUMENTATION - bool "Instrumentation Support" - default y - ---help--- - Say Y here to get to see options related to performance measurement, - system-wide debugging, and testing. This option alone does not add any - kernel code. - - If you say N, all options in this submenu will be skipped and - disabled. If you're trying to debug the kernel itself, go see the - Kernel Hacking menu. - -if INSTRUMENTATION - -config PROFILING - bool "Profiling support (EXPERIMENTAL)" - help - Say Y here to enable the extended profiling support mechanisms used - by profilers such as OProfile. - -config OPROFILE - tristate "OProfile system profiling (EXPERIMENTAL)" - depends on PROFILING && !UML - depends on HAVE_OPROFILE - help - OProfile is a profiling system capable of profiling the - whole system, include the kernel, kernel modules, libraries, - and applications. - - If unsure, say N. - -config HAVE_OPROFILE - def_bool n - -config KPROBES - bool "Kprobes" - depends on KALLSYMS && MODULES && !UML - depends on HAVE_KPROBES - help - Kprobes allows you to trap at almost any kernel address and - execute a callback function. register_kprobe() establishes - a probepoint and specifies the callback. Kprobes is useful - for kernel debugging, non-intrusive instrumentation and testing. - If in doubt, say "N". - -config HAVE_KPROBES - def_bool n - -config MARKERS - bool "Activate markers" - help - Place an empty function call at each marker site. Can be - dynamically changed for a probe function. - -endif # INSTRUMENTATION -- cgit v1.2.3