mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
libbuiltin/kconfig: Modify coverage function dependencies
Currently, there are four code coverage statistics implementations:
1. GCC native implementation
2. CLANG native implementation
3. GCC coverage nuttx mini version
4. CLANG coverage nuttx mini version
Coverage Support:
GCC native implementation CLANG native implementation GCC coverage nuttx mini version CLANG coverage nuttx mini version
Compiler version requirements ALL ALL GCC 13.2 and below CLANG 17.0 and below
Program coverage statistics support Main program √ √ √ √
Program coverage statistics support Interrupt program X √ √ √
Configuration options CONFIG_COVERAGE_TOOLCHAIN CONFIG_COVERAGE_COMPILER_RT CONFIG_COVERAGE_MINI CONFIG_COVERAGE_MINI
Platform Support ARM √ √ √ √
ARM64 √ √
(Coming soon, not yet merged)
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
f53f0ecf0e
commit
181f461145
@@ -19,6 +19,7 @@ choice
|
||||
|
||||
config BUILTIN_COMPILER_RT
|
||||
bool "Builtin LLVM libclang_rt.builtins"
|
||||
depends on ARCH_TOOLCHAIN_GNU
|
||||
select LIB_BUILTIN
|
||||
select LIB_COMPILER_RT
|
||||
---help---
|
||||
@@ -37,6 +38,7 @@ choice
|
||||
|
||||
config COVERAGE_COMPILER_RT
|
||||
bool "Builtin libclang_rt.profile"
|
||||
depends on ARCH_TOOLCHAIN_CLANG
|
||||
select LIB_BUILTIN
|
||||
select LIB_COMPILER_RT
|
||||
---help---
|
||||
@@ -54,6 +56,7 @@ config COVERAGE_MINI
|
||||
|
||||
config COVERAGE_TOOLCHAIN
|
||||
bool "Link toolchain gcov library to the OS"
|
||||
depends on ARCH_TOOLCHAIN_GCC
|
||||
---help---
|
||||
Link the toolchain coverage library to the OS.
|
||||
|
||||
@@ -85,6 +88,20 @@ config PROFILE_NONE
|
||||
|
||||
endchoice
|
||||
|
||||
config COVERAGE_ALL
|
||||
bool "Enable code coverage for all module"
|
||||
depends on !COVERAGE_NONE
|
||||
default n
|
||||
---help---
|
||||
Enable code coverage for all code, it will instrument
|
||||
all code, which will cause a large performance penalty for the code.
|
||||
If use GCC, it will add the '-fprofile-generate
|
||||
-ftest-coverage' parameter to all module.
|
||||
If use Clang, it will add the '-fprofile-instr-generate
|
||||
-fcoverage-mapping' parameter to all module.
|
||||
The data can then be printed nsh run "gcov dump -d /xxx/xxx"
|
||||
|
||||
|
||||
config PROFILE_ALL
|
||||
bool "Enable gprof call graph for all modules"
|
||||
depends on FRAME_POINTER && !PROFILE_NONE
|
||||
|
||||
Reference in New Issue
Block a user