Hi ,

 

We are trying to do a code coverage in Android , we are following the process in the gcov.txt in documentation of the sources. We are facing some issues in getting the .gcda files ,

 

Issue:

After mounting mount –t debugfs none /sys/debug/kernel

.gcda files are not getting generated in /sys/kernel/debug folder (only reset file is seen) no folders are available.

 

 

Process

We are trying to follow the below process:

 

1.       Download the Kernel sources

2.       Go to the kernel source directory. Enable the gcov-kernel configuration options:

#make menuconfig

General setup

GCOV-based kernel profiling

select “Enable gcov-based kernel profiling”

 

3.       Save and Exit from Menuconfig

 

Modules/ Drivers

 

In the Makefile of the code to be covered we enable.

 

GCOV_PROFILE := y

 

We are also going to the subdirectory or a dependency of driver on other files, the same needs to be added to the Makefile of those respective files/ directories

 

For android , we are doing a make to generate boot.tar.gz and system.tar.gz.

 

We flash this into a target using flashdevice.sh (Android specific) . We are able to see .gcno files in the build directory (this confirms coverage is enabled).

 

 

After boot in the target,

We do a mount –t debugfs none /sys/debug/kernel

we see there are no .gcda files in the /sys/debug/kernel folder .

 

 

Please advise me what could have went wrong or should we do something else to get a .gcda files in the /sys/debug/kernel folder.

 

 

Any pointers will be helpful.

 

Thanks

Aruselvan.