Gcov: Enable Code coverage reporting over UART.
This patch provides support for generating Code coverage reports. The prj.conf needs to enable CONFIG_COVERAGE. Once enabled, the code coverage data dump now comes via UART. This data dump on the UART is triggered once the main thread exits. Next step is to save this data dump on file. Then run scripts/gen_gcov_files.py with the serial console log as argument. The last step would be be to run the gcovr. Use the following cmd gcovr -r . --html -o gcov_report/coverage.html --html-details Currently supported architectures are ARM and x86. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
e223cfa9dd
commit
71e90f98fd
3 changed files with 24 additions and 0 deletions
|
@ -41,6 +41,18 @@
|
|||
__object_access_end = .;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COVERAGE_GCOV
|
||||
/* Section needed by gcov when coverage is turned on.*/
|
||||
SECTION_PROLOGUE (gcov, (OPTIONAL),)
|
||||
{
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
#endif /* CONFIG_COVERAGE_GCOV */
|
||||
|
||||
SECTION_PROLOGUE (devconfig, (OPTIONAL),)
|
||||
{
|
||||
__devconfig_start = .;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue