Enable gcov support on the ARM architecture
Subsystems (2)
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]>
--- 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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
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@@ -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 = -pgThis 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
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@@ -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 = -pgThis 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 withoutarch/arm/kernelbits?
Without that part it looks ok to me.
Arnd
PATCH v2 1/1 Enable gcov support on the ARM architecture
In reply to Riku VoipioEnable 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]>
--- 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
@@ -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
@@ -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
@@ -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