Enable gcov-based kernel profiling

modulename: base.ko

configname: CONFIG_GCOV_KERNEL

Linux Kernel Configuration
└─>GCOV-based kernel profiling
└─>Enable gcov-based kernel profiling
In linux kernel since version 2.6.31 (release Date: 2009-09-09)  
This option enables gcov-based code profiling (e.g. for code coverage
measurements).

If unsure, say N.

Additionally specify CONFIG_GCOV_PROFILE_ALL=y to get profiling data
for the entire kernel. To enable profiling for specific files or
directories, add a line similar to the following to the respective
Makefile:

For a single file (e.g. main.o):
GCOV_PROFILE_main.o := y

For all files in one directory:
GCOV_PROFILE := y

To exclude files from being profiled even when CONFIG_GCOV_PROFILE_ALL
is specified, use:

GCOV_PROFILE_main.o := n
and:
GCOV_PROFILE := n

Note that the debugfs filesystem has to be mounted to access
profiling data.

source code:
selects

CONFIG_CONSTRUCTORS

depends
CONFIG_CONSTRUCTORS
CONFIG_DEBUG_FS or CONFIG_CLANG_VERSIONCONFIG_110000 or  NOT CONFIG_CC_IS_CLANG or CONFIG_CC_HAS_NO_PROFILE_FN_ATTR or  NOT CONFIG_ARCH_WANTS_NO_INSTR