Skip to content

Commit 1802656

Browse files
committed
io_uring: add GCOV_PROFILE_URING Kconfig option
If GCOV is enabled and this option is set, it enables code coverage profiling of the io_uring subsystem. Only use this for test purposes, as it will impact the runtime performance. Signed-off-by: Jens Axboe <[email protected]>
1 parent ae98dbf commit 1802656

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

init/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,19 @@ config IO_URING
16871687
applications to submit and complete IO through submission and
16881688
completion rings that are shared between the kernel and application.
16891689

1690+
config GCOV_PROFILE_URING
1691+
bool "Enable GCOV profiling on the io_uring subsystem"
1692+
depends on GCOV_KERNEL
1693+
help
1694+
Enable GCOV profiling on the io_uring subsystem, to facilitate
1695+
code coverage testing.
1696+
1697+
If unsure, say N.
1698+
1699+
Note that this will have a negative impact on the performance of
1700+
the io_uring subsystem, hence this should only be enabled for
1701+
specific test purposes.
1702+
16901703
config ADVISE_SYSCALLS
16911704
bool "Enable madvise/fadvise syscalls" if EXPERT
16921705
default y

io_uring/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#
33
# Makefile for io_uring
44

5+
ifdef CONFIG_GCOV_PROFILE_URING
6+
GCOV_PROFILE := y
7+
endif
8+
59
obj-$(CONFIG_IO_URING) += io_uring.o opdef.o kbuf.o rsrc.o notif.o \
610
tctx.o filetable.o rw.o net.o poll.o \
711
eventfd.o uring_cmd.o openclose.o \

0 commit comments

Comments
 (0)