tests: enable the code coverage report for qemu_x86_64
Enable the code coverage report for qemu_x86_64 platform. See issue #17991 please. Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
This commit is contained in:
parent
0d7bdbc876
commit
8d5a22c3c1
4 changed files with 20 additions and 5 deletions
|
@ -12,3 +12,4 @@ config BOARD_QEMU_X86_64
|
|||
depends on SOC_IA32
|
||||
select QEMU_TARGET
|
||||
select X86_64
|
||||
select HAS_COVERAGE_SUPPORT
|
||||
|
|
|
@ -108,7 +108,7 @@ void z_bss_zero(void)
|
|||
#endif /* CONFIG_CODE_DATA_RELOCATION */
|
||||
#ifdef CONFIG_COVERAGE_GCOV
|
||||
(void)memset(&__gcov_bss_start, 0,
|
||||
((uint32_t) &__gcov_bss_end - (uint32_t) &__gcov_bss_start));
|
||||
((uintptr_t) &__gcov_bss_end - (uintptr_t) &__gcov_bss_start));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -258,9 +258,9 @@ coverage_dump_end:
|
|||
/* Initialize the gcov by calling the required constructors */
|
||||
void gcov_static_init(void)
|
||||
{
|
||||
extern uint32_t __init_array_start, __init_array_end;
|
||||
uint32_t func_pointer_start = (uint32_t) &__init_array_start;
|
||||
uint32_t func_pointer_end = (uint32_t) &__init_array_end;
|
||||
extern uintptr_t __init_array_start, __init_array_end;
|
||||
uintptr_t func_pointer_start = (uintptr_t) &__init_array_start;
|
||||
uintptr_t func_pointer_end = (uintptr_t) &__init_array_end;
|
||||
|
||||
while (func_pointer_start < func_pointer_end) {
|
||||
void (**p)(void);
|
||||
|
|
|
@ -31,7 +31,21 @@ __gcov_bss_num_words = ((__gcov_bss_end - __gcov_bss_start) >> 2);
|
|||
__gcov_bss_size = __gcov_bss_end - __gcov_bss_start;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
#ifdef CONFIG_X86_64
|
||||
SECTION_PROLOGUE(_GCOV_BSS_SECTION_NAME, (NOLOAD), ALIGN(16))
|
||||
{
|
||||
MMU_PAGE_ALIGN
|
||||
__gcov_bss_start = .;
|
||||
*(".bss.__gcov0.*");
|
||||
. = ALIGN(8);
|
||||
MMU_PAGE_ALIGN
|
||||
__gcov_bss_end = .;
|
||||
}GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
|
||||
|
||||
__gcov_bss_num_words = ((__gcov_bss_end - __gcov_bss_start) >> 2);
|
||||
__gcov_bss_size = __gcov_bss_end - __gcov_bss_start;
|
||||
|
||||
#elif CONFIG_X86
|
||||
SECTION_PROLOGUE(_GCOV_BSS_SECTION_NAME, (NOLOAD),)
|
||||
{
|
||||
MMU_PAGE_ALIGN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue