Skip to content

Commit

Permalink
gcov: Add gcov gcc implementation and toolchain to ci compilation
Browse files Browse the repository at this point in the history
When running qemu/nsh_smp or sim/nsh configuration, run gcov -d /tmp/xxx
to save all gcov generated data and export them to the host. Use
./tools/gcov.sh to parse and generate reports. For details, see:
Documentation/applications/system/gcov/index.rst

Signed-off-by: wangmingrong1 <[email protected]>
  • Loading branch information
W-M-R committed Nov 28, 2024
1 parent 5354850 commit f04955d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_ASSERT_RESET_VALUE=2
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_COVERAGE_ALL=y
CONFIG_COVERAGE_TOOLCHAIN=y
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
Expand All @@ -38,12 +40,13 @@ CONFIG_FRAME_POINTER=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=16384
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_MM_KASAN=y
CONFIG_MM_KASAN_GLOBAL=y
CONFIG_LIBC_MEMFD_ERROR=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
Expand All @@ -66,6 +69,7 @@ CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=3
CONFIG_START_YEAR=2022
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_GCOV=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_SYSTEM_TASKSET=y
Expand Down
2 changes: 0 additions & 2 deletions boards/sim/sim/sim/configs/kasan/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ CONFIG_ARCH_SIM=y
CONFIG_BOARDCTL_POWEROFF=y
CONFIG_BUILTIN=y
CONFIG_CANCELLATION_POINTS=y
CONFIG_COVERAGE_TOOLCHAIN=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_LOOP=y
Expand Down Expand Up @@ -45,7 +44,6 @@ CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_EVTHREAD=y
CONFIG_SYSTEM_GCOV=y
CONFIG_SYSTEM_NSH=y
CONFIG_TESTING_OSTEST=y
CONFIG_TESTING_OSTEST_AIO=y
Expand Down
4 changes: 4 additions & 0 deletions boards/sim/sim/sim/configs/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ CONFIG_BOARDCTL_POWEROFF=y
CONFIG_BOARD_LOOPSPERMSEC=0
CONFIG_BOOT_RUNFROMEXTSRAM=y
CONFIG_BUILTIN=y
CONFIG_COVERAGE_ALL=y
CONFIG_COVERAGE_TOOLCHAIN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_GPIO=y
CONFIG_DEV_LOOP=y
Expand All @@ -33,6 +35,7 @@ CONFIG_FS_PROCFS=y
CONFIG_FS_RAMMAP=y
CONFIG_FS_ROMFS=y
CONFIG_GPIO_LOWER_HALF=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_IOEXPANDER=y
Expand Down Expand Up @@ -62,5 +65,6 @@ CONFIG_SIM_WALLTIME_SIGNAL=y
CONFIG_START_MONTH=6
CONFIG_START_YEAR=2008
CONFIG_SYSTEM_DUMPSTACK=y
CONFIG_SYSTEM_GCOV=y
CONFIG_SYSTEM_NSH=y
CONFIG_TESTING_OSTEST=y

0 comments on commit f04955d

Please sign in to comment.