Skip to contentSkip to conversation

reorder tracer support

PATCH In review Jan Kiszka 1 participant 1 message Sep 29, 2006

Subsystems (2)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/2 reorder tracer support

This patch moves the I-pipe tracer configuration into the kernel hacking section of Kconfig. My feeling is that this is the place where is really belongs. :)

Furthermore, it allows to separately control if mcount support should be activated, i.e. logging of each kernel function entry. Switching this off can be useful if only explicit trace points are desired (e.g. ipipe_trace_special / xntrace_special or the worst-case timing of some code path via xntrace_user_start/stop).

Finally, the patch fixes some minor dependencies of the tracer.

Jan

---
 Makefile                         |    8 ++--
 arch/i386/boot/compressed/misc.c |    2 -
 arch/i386/kernel/Makefile        |    2 -
 arch/i386/kernel/ipipe-root.c    |    4 +-
 kernel/ipipe/Kconfig             |   54 ------------------------------
 kernel/ipipe/Kconfig.debug       |   69 +++++++++++++++++++++++++++++++++++++++
 lib/Kconfig.debug                |    2 +
 7 files changed, 79 insertions(+), 62 deletions(-)
Makefile +4 -4
Index: linux-2.6.17.13/Makefile
===================================================================
@@ -469,15 +469,15 @@ else
 CFLAGS		+= -O2
 endif
 
-ifdef CONFIG_IPIPE_TRACE
-CFLAGS          += -pg -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
-else
+ifdef CONFIG_IPIPE_TRACE_MCOUNT
+CFLAGS          += -pg
+endif
+
 ifdef CONFIG_FRAME_POINTER
 CFLAGS		+= -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
 else
 CFLAGS		+= -fomit-frame-pointer
 endif
-endif
 
 ifdef CONFIG_UNWIND_INFO
 CFLAGS		+= -fasynchronous-unwind-tables
kernel/ipipe/Kconfig +0 -54

57 lines not on this page · raw message

kernel/ipipe/Kconfig.debug new file +69 -0

69 lines not on this page · raw message

lib/Kconfig.debug +2 -0
Index: linux-2.6.17.13/lib/Kconfig.debug
===================================================================
@@ -23,6 +23,8 @@ config MAGIC_SYSRQ
 	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
 	  unless you really know what this hack does.
 
+source "kernel/ipipe/Kconfig.debug"
+
 config DEBUG_KERNEL
 	bool "Kernel debugging"
 	help
arch/i386/boot/compressed/misc.c +1 -1
Index: linux-2.6.17.13/arch/i386/boot/compressed/misc.c
===================================================================
@@ -15,7 +15,7 @@
 #include <asm/io.h>
 #include <asm/page.h>
 
-#ifdef CONFIG_IPIPE_TRACE
+#ifdef CONFIG_IPIPE_TRACE_MCOUNT
 void __attribute__ ((no_instrument_function)) mcount(void)
 {
 }
arch/i386/kernel/Makefile +1 -1
Index: linux-2.6.17.13/arch/i386/kernel/Makefile
===================================================================
@@ -32,7 +32,7 @@ obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_MODULES)		+= module.o
 obj-y				+= sysenter.o vsyscall.o
 obj-$(CONFIG_IPIPE)		+= ipipe-core.o ipipe-root.o
-obj-$(CONFIG_IPIPE_TRACE)	+= ipipe-mcount.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= ipipe-mcount.o
 obj-$(CONFIG_ACPI_SRAT) 	+= srat.o
 obj-$(CONFIG_HPET_TIMER) 	+= time_hpet.o
 obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
arch/i386/kernel/ipipe-root.c +2 -2
Index: linux-2.6.17.13/arch/i386/kernel/ipipe-root.c
===================================================================
@@ -642,7 +642,7 @@ EXPORT_PER_CPU_SYMBOL_GPL(init_tss);
 EXPORT_PER_CPU_SYMBOL_GPL(cpu_tlbstate);
 #endif /* CONFIG_SMP */
 
-#ifdef CONFIG_IPIPE_TRACE
+#ifdef CONFIG_IPIPE_TRACE_MCOUNT
 void notrace mcount(void);
 EXPORT_SYMBOL(mcount);
-#endif /* CONFIG_IPIPE_TRACE */
+#endif /* CONFIG_IPIPE_TRACE_MCOUNT */