@@ -1566,3 +1566,9 @@ endmenu
config SERIAL_MCTRL_GPIO
tristate
+
+config SERIAL_GCOV
+ bool "open gcov for serial"
+ depends on GCOV_PROFILE_PREREQS
+ help
+ Say Y here to enable gcov in serial.
@@ -2,6 +2,7 @@
#
# Makefile for the kernel serial device drivers.
#
+GCOV_PROFILE := $(CONFIG_SERIAL_GCOV)
obj-$(CONFIG_SERIAL_CORE) += serial_core.o
@@ -51,6 +51,20 @@ config GCOV_PROFILE_ALL
larger and run slower. Also be sure to exclude files from profiling
which are not linked to the kernel image to prevent linker errors.
+config GCOV_PROFILE_PREREQS
+ bool "Profile Kernel subsytem"
+ depends on !COMPILE_TEST
+ depends on GCOV_KERNEL
+ default n
+ help
+ This options activates profiling for the specified kernel modules.
+
+ If unsure, say N.
+
+ When some modules need Gcov data, enable this config, then configure
+ with gcov on the corresponding modules configs.The directories or files
+ of these modules will be added profiling flags after kernel compile.
+
choice
prompt "Specify GCOV format"
depends on GCOV_KERNEL