Commit bc75dcc3 authored by Vegard Nossum's avatar Vegard Nossum Committed by David S. Miller
Browse files

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: default avatarAllison Henderson <allison.henderson@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a0f6e5e9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -26,3 +26,12 @@ config RDS_DEBUG
	bool "RDS debugging messages"
	depends on RDS
	default n

config GCOV_PROFILE_RDS
	bool "Enable GCOV profiling on RDS"
	depends on GCOV_KERNEL
	help
	  Enable GCOV profiling on RDS for checking which functions/lines
	  are executed.

	  If unsure, say N.
+5 −0
Original line number Diff line number Diff line
@@ -15,3 +15,8 @@ rds_tcp-y := tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
			tcp_send.o tcp_stats.o

ccflags-$(CONFIG_RDS_DEBUG)	:=	-DRDS_DEBUG

# for GCOV coverage profiling
ifdef CONFIG_GCOV_PROFILE_RDS
GCOV_PROFILE := y
endif