testsuite: coverage: create kconfig option for gcov dump heap size

The heap size for serial dump of gcov data is currently
defined by MALLOC_MAX_HEAP_SIZE, which cannot be
adjusted by kconfig. This commit adds a new kconfig
option, CONFIG_COVERAGE_GCOV_HEAP_SIZE, which retains
the behavior or MALLOC_MAX_HEAP_SIZE by default.

Signed-off-by: Jason Wright <jwright@synchron.com>
This commit is contained in:
Jason Wright 2022-11-04 22:44:09 -04:00 committed by Anas Nashif
commit e369a8899f
2 changed files with 9 additions and 12 deletions

View file

@ -10,18 +10,7 @@
#include <errno.h>
#include "coverage.h"
#if defined(CONFIG_X86) || defined(CONFIG_SOC_SERIES_MPS2)
#define MALLOC_MAX_HEAP_SIZE 32768
#define MALLOC_MIN_BLOCK_SIZE 128
#else
#define MALLOC_MAX_HEAP_SIZE 16384
#define MALLOC_MIN_BLOCK_SIZE 64
#endif
K_HEAP_DEFINE(gcov_heap, MALLOC_MAX_HEAP_SIZE);
K_HEAP_DEFINE(gcov_heap, CONFIG_COVERAGE_GCOV_HEAP_SIZE);
static struct gcov_info *gcov_info_head;