Skip to content

Commit bc75dcc

Browse files
vegarddavem330
authored andcommitted
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>
1 parent a0f6e5e commit bc75dcc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

net/rds/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ config RDS_DEBUG
2626
bool "RDS debugging messages"
2727
depends on RDS
2828
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.

net/rds/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ rds_tcp-y := tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
1515
tcp_send.o tcp_stats.o
1616

1717
ccflags-$(CONFIG_RDS_DEBUG) := -DRDS_DEBUG
18+
19+
# for GCOV coverage profiling
20+
ifdef CONFIG_GCOV_PROFILE_RDS
21+
GCOV_PROFILE := y
22+
endif

0 commit comments

Comments
 (0)