Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: rds: add option for GCOV profiling

To better our unit tests we need code coverage to be part of the kernel.
This patch borrows heavily from how CONFIG_GCOV_PROFILE_FTRACE is
implemented

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vegard Nossum and committed by
David S. Miller
bc75dcc3 a0f6e5e9

+14
+9
net/rds/Kconfig
··· 26 26 bool "RDS debugging messages" 27 27 depends on RDS 28 28 default n 29 + 30 + config GCOV_PROFILE_RDS 31 + bool "Enable GCOV profiling on RDS" 32 + depends on GCOV_KERNEL 33 + help 34 + Enable GCOV profiling on RDS for checking which functions/lines 35 + are executed. 36 + 37 + If unsure, say N.
+5
net/rds/Makefile
··· 15 15 tcp_send.o tcp_stats.o 16 16 17 17 ccflags-$(CONFIG_RDS_DEBUG) := -DRDS_DEBUG 18 + 19 + # for GCOV coverage profiling 20 + ifdef CONFIG_GCOV_PROFILE_RDS 21 + GCOV_PROFILE := y 22 + endif