Skip to contentSkip to conversation

Include instrumentation menu

PATCH New Haavard Skinnemoen 2 participants 4 messages Dec 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Include instrumentation menu

Remove KPROBES option from Kconfig.debug and include kernel/Kconfig.instrumentation.

---
 arch/avr32/Kconfig       |    2 ++
 arch/avr32/Kconfig.debug |   10 ----------
 2 files changed, 2 insertions(+), 10 deletions(-)
arch/avr32/Kconfig +2 -0
index b77abce..bc08c7f 100644
@@ -219,6 +219,8 @@ source "drivers/Kconfig"
 
 source "fs/Kconfig"
 
+source "kernel/Kconfig.instrumentation"
+
 source "arch/avr32/Kconfig.debug"
 
 source "security/Kconfig"
arch/avr32/Kconfig.debug +0 -10
index 64ace00..2283933 100644
@@ -6,14 +6,4 @@ config TRACE_IRQFLAGS_SUPPORT
 
 source "lib/Kconfig.debug"
 
-config KPROBES
-	bool "Kprobes"
-	depends on DEBUG_KERNEL
-	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".
-
 endmenu
Signature · 1 line
1.5.3.4
#1 lore raw

PATCH 2/2 Oprofile support

This adds the necessary architecture code to run oprofile on AVR32 using the performance counters documented by the AVR32 Architecture Manual.

---
Mathieu, I want to get oprofile support queued up for 2.6.25, and since I don't see any signs that the Kconfig.instrumentation removal patches are going in any time soon, I'm going to turn things around and apply these two patches to my tree.

This unfortunately means that your patch won't apply cleanly to -mm anymore, but it'll hopefully be easy to fix. When you do, please add ARCH_SUPPORTS_OPROFILE to arch/avr32/Kconfig as well.

 arch/avr32/Makefile                  |    1 +
 arch/avr32/oprofile/Makefile         |    8 +
 arch/avr32/oprofile/op_model_avr32.c |  235 ++++++++++++++++++++++++++++++++++
 kernel/Kconfig.instrumentation       |    2 +-
 4 files changed, 245 insertions(+), 1 deletions(-)
 create mode 100644 arch/avr32/oprofile/Makefile
 create mode 100644 arch/avr32/oprofile/op_model_avr32.c
arch/avr32/Makefile +1 -0
index 8791864..f75d52c 100644
@@ -31,6 +31,7 @@ core-$(CONFIG_BOARD_ATNGW100)		+= arch/avr32/boards/atngw100/
 core-$(CONFIG_LOADER_U_BOOT)		+= arch/avr32/boot/u-boot/
 core-y					+= arch/avr32/kernel/
 core-y					+= arch/avr32/mm/
+drivers-$(CONFIG_OPROFILE)		+= arch/avr32/oprofile/
 libs-y					+= arch/avr32/lib/
 
 archincdir-$(CONFIG_PLATFORM_AT32AP)	:= arch-at32ap
arch/avr32/oprofile/Makefile new file +8 -0
new file mode 100644
index 0000000..1fe81c3
@@ -0,0 +1,8 @@
+obj-$(CONFIG_OPROFILE) += oprofile.o
+
+oprofile-y		:= $(addprefix ../../../drivers/oprofile/,	\
+				oprof.o cpu_buffer.o buffer_sync.o	\
+				event_buffer.o oprofile_files.o		\
+				oprofilefs.o oprofile_stats.o		\
+				timer_int.o)
+oprofile-y		+= op_model_avr32.o
arch/avr32/oprofile/op_model_avr32.c new file +235 -0

235 lines not on this page · raw message

kernel/Kconfig.instrumentation +1 -1
index f5f2c76..fcd4bf7 100644
@@ -21,7 +21,7 @@ config PROFILING
 config OPROFILE
 	tristate "OProfile system profiling (EXPERIMENTAL)"
 	depends on PROFILING
-	depends on ALPHA || ARM || BLACKFIN || X86_32 || IA64 || M32R || MIPS || PARISC || PPC || S390 || SUPERH || SPARC || X86_64
+	depends on ALPHA || ARM || AVR32 || BLACKFIN || X86_32 || IA64 || M32R || MIPS || PARISC || PPC || S390 || SUPERH || SPARC || X86_64
 	help
 	  OProfile is a profiling system capable of profiling the
 	  whole system, include the kernel, kernel modules, libraries,
Signature · 1 line
1.5.3.4
#2 lore raw

PATCH 1/1 Fix AVR32 for instrumentation menu removal

Quoting : Haavard Skinnemoen <[email protected]>

Mathieu, I want to get oprofile support queued up for 2.6.25, and since I don't see any signs that the Kconfig.instrumentation removal patches are going in any time soon, I'm going to turn things around and apply these two patches to my tree.

This unfortunately means that your patch won't apply cleanly to -mm anymore, but it'll hopefully be easy to fix. When you do, please add ARCH_SUPPORTS_OPROFILE to arch/avr32/Kconfig as well.

Me:

This patch fixes the changes made by [PATCH 2/2] [AVR32] Oprofile support so the instrumentation removal patch applies correctly.

Should be applied after "[PATCH 2/2] [AVR32] Oprofile support", but before the instrumentation menu removal patches.

CC Haavard Skinnemoen <[email protected]>
CC Andrew Morton <[email protected]>
---
 kernel/Kconfig.instrumentation |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/Kconfig.instrumentation +1 -1
Index: linux-2.6-lttng/kernel/Kconfig.instrumentation
===================================================================
@@ -21,7 +21,7 @@ config PROFILING
 config OPROFILE
 	tristate "OProfile system profiling (EXPERIMENTAL)"
 	depends on PROFILING
-	depends on ALPHA || ARM || AVR32 || BLACKFIN || X86_32 || IA64 || M32R || MIPS || PARISC || PPC || S390 || SUPERH || SPARC || X86_64
+	depends on ALPHA || ARM || BLACKFIN || X86_32 || IA64 || M32R || MIPS || PARISC || PPC || S390 || SUPERH || SPARC || X86_64
 	help
 	  OProfile is a profiling system capable of profiling the
 	  whole system, include the kernel, kernel modules, libraries,
Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#3 lore raw

PATCH 1/1 AVR32 - Add HAVE_OPROFILE

In reply to Haavard Skinnemoen

Should be applied after the
"Add HAVE_KPROBES" patch.

CC Haavard Skinnemoen <[email protected]>
CC Andrew Morton <[email protected]>
---
 arch/avr32/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/avr32/Kconfig +1 -0
Index: linux-2.6-lttng/arch/avr32/Kconfig
===================================================================
@@ -12,6 +12,7 @@ config AVR32
 	# that we usually don't need on AVR32.
 	select EMBEDDED
 	select HAVE_KPROBES
+	select HAVE_OPROFILE
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68