Skip to contentSkip to conversation

Enable gcov support on the ARM architecture

PATCH New Riku Voipio 2 participants 5 messages Sep 8, 2014 – Sep 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable gcov support on the ARM architecture

Enable gcov support for ARM based on original patches by David Singleton and George G. Davis

Riku - updated to patch to current mainline kernel. The patch has been submitted in 2010, 2012 - for symmetry, now in 2014 too.

https://lwn.net/Articles/390419/
http://marc.info/?l=linux-arm-kernel&m=133823081813044

From: Vincent Sanders <[email protected]>

Cc Andrey Ryabinin <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Russell King <[email protected]>
Cc Naresh Kamboju <[email protected]>
---
 arch/arm/boot/bootp/Makefile      | 2 ++
 arch/arm/boot/compressed/Makefile | 2 ++
 arch/arm/kernel/Makefile          | 2 ++
 kernel/gcov/Kconfig               | 2 +-
 4 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/boot/bootp/Makefile +2 -0
index c394e30..5761f00 100644
@@ -5,6 +5,8 @@
 # architecture-specific flags and dependencies.
 #
 
+GCOV_PROFILE	:= n
+
 LDFLAGS_bootp	:=-p --no-undefined -X \
 		 --defsym initrd_phys=$(INITRD_PHYS) \
 		 --defsym params_phys=$(PARAMS_PHYS) -T
arch/arm/boot/compressed/Makefile +2 -0
index 76a50ec..3ea230a 100644
@@ -37,6 +37,8 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y)
 OBJS		+= hyp-stub.o
 endif
 
+GCOV_PROFILE		:= n
+
 #
 # Architecture dependencies
 #
arch/arm/kernel/Makefile +2 -0
index 38ddd9f..979c4e9 100644
@@ -5,6 +5,8 @@
 CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
 AFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
 
+GCOV_PROFILE := n
+
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_insn.o = -pg
kernel/gcov/Kconfig +1 -1
index d04ce8a..cf66c5c 100644
@@ -35,7 +35,7 @@ config GCOV_KERNEL
 config GCOV_PROFILE_ALL
 	bool "Profile entire Kernel"
 	depends on GCOV_KERNEL
-	depends on SUPERH || S390 || X86 || PPC || MICROBLAZE
+	depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM
 	default n
 	---help---
 	This options activates profiling for the entire kernel.
Signature · 1 line
2.0.1
#1 lore raw

PATCH 1/1 Enable gcov support on the ARM architecture

Quoted 6 lines · On Monday 08 September 2014 15:59:34 Riku Voipio wrote:
arch/arm/kernel/Makefile +0 -0
index 38ddd9f..979c4e9 100644

arch/arm/kernel/Makefile line 12

Quoted 8 lines
arch/arm/kernel/Makefile +2 -0
@@ -5,6 +5,8 @@
 CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
 AFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
 
+GCOV_PROFILE := n
+
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_insn.o = -pg

This part doesn't look right: you don't want to disable profiling for the entire directory, only for the parts on which it cannot be used.

Arnd

#2 lore raw

PATCH 1/1 Enable gcov support on the ARM architecture

Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · On Monday 08 September 2014 15:59:34 Riku Voipio wrote:
arch/arm/kernel/Makefile +0 -0
index 38ddd9f..979c4e9 100644
@@ -5,6 +5,8 @@
 CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
 AFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
 
Quoted 8 lines

arch/arm/kernel/Makefile line 12

Quoted 5 lines
arch/arm/kernel/Makefile +2 -0
+GCOV_PROFILE := n
+
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_insn.o = -pg

This part doesn't look right: you don't want to disable profiling for the entire directory, only for the parts on which it cannot be used.

You are right. I can just remove that hunk and I can both boot and record coverage info from arch/arm/kernel. Any other comments, or should I just resubmit without arch/arm/kernel bits?

Riku

#3 lore raw

PATCH 1/1 Enable gcov support on the ARM architecture

Quoted 19 lines · On Wednesday 10 September 2014 16:45:07 Riku Voipio wrote:
Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · On Monday 08 September 2014 15:59:34 Riku Voipio wrote:
arch/arm/kernel/Makefile +0 -0
index 38ddd9f..979c4e9 100644
@@ -5,6 +5,8 @@
 CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
 AFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
 
Quoted 8 lines

arch/arm/kernel/Makefile line 12

Quoted 5 lines
arch/arm/kernel/Makefile +2 -0
+GCOV_PROFILE := n
+
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_insn.o = -pg

This part doesn't look right: you don't want to disable profiling for the entire directory, only for the parts on which it cannot be used.

Quoted 3 lines

You are right. I can just remove that hunk and I can both boot and record coverage info from arch/arm/kernel. Any other comments, or should I just resubmit without arch/arm/kernel bits?

Without that part it looks ok to me.

Arnd

#4 lore raw

PATCH v2 1/1 Enable gcov support on the ARM architecture

In reply to Riku Voipio

Enable gcov support for ARM based on original patches by David Singleton and George G. Davis

Riku - updated to patch to current mainline kernel. The patch has been submitted in 2010, 2012 - for symmetry, now in 2014 too.

https://lwn.net/Articles/390419/
http://marc.info/?l=linux-arm-kernel&m=133823081813044

v2: remove arch/arm/kernel from gcov disabled files

From: Vincent Sanders <[email protected]>

Cc Andrey Ryabinin <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Russell King <[email protected]>
Cc Naresh Kamboju <[email protected]>
---
 arch/arm/boot/bootp/Makefile      | 2 ++
 arch/arm/boot/compressed/Makefile | 2 ++
 kernel/gcov/Kconfig               | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)
arch/arm/boot/bootp/Makefile +2 -0
index c394e30..5761f00 100644
@@ -5,6 +5,8 @@
 # architecture-specific flags and dependencies.
 #
 
+GCOV_PROFILE	:= n
+
 LDFLAGS_bootp	:=-p --no-undefined -X \
 		 --defsym initrd_phys=$(INITRD_PHYS) \
 		 --defsym params_phys=$(PARAMS_PHYS) -T
arch/arm/boot/compressed/Makefile +2 -0
index 76a50ec..3ea230a 100644
@@ -37,6 +37,8 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y)
 OBJS		+= hyp-stub.o
 endif
 
+GCOV_PROFILE		:= n
+
 #
 # Architecture dependencies
 #
kernel/gcov/Kconfig +1 -1
index d04ce8a..cf66c5c 100644
@@ -35,7 +35,7 @@ config GCOV_KERNEL
 config GCOV_PROFILE_ALL
 	bool "Profile entire Kernel"
 	depends on GCOV_KERNEL
-	depends on SUPERH || S390 || X86 || PPC || MICROBLAZE
+	depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM
 	default n
 	---help---
 	This options activates profiling for the entire kernel.
Signature · 1 line
2.0.1