mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
1. Excerpted from: https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/blob/main/samples/src/cpp-baremetal-semihosting-prof/proflib.c 2. Since llvm profile supports more than just gcov, and some features have not yet been explored, two clang gcov implementations are supported after this patch 3. Using this lib only supports the gcov compilation options of "-fprofile-instr-generate -fcoverage-mapping" 4. This file is heavily dependent on the compiler clang version, and is currently aligned with ci, supporting 17.0.1 and below. 18 and above are not supported by this library due to different internal implementations of the compiler Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
106 lines
2.7 KiB
Text
106 lines
2.7 KiB
Text
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
comment "Toolchain Library Support"
|
|
|
|
config LIB_BUILTIN
|
|
bool
|
|
|
|
config LIB_COMPILER_RT
|
|
bool
|
|
|
|
choice
|
|
prompt "Builtin toolchain support"
|
|
default BUILTIN_TOOLCHAIN
|
|
---help---
|
|
Select the builtin library
|
|
|
|
config BUILTIN_COMPILER_RT
|
|
bool "Builtin LLVM libclang_rt.builtins"
|
|
select LIB_BUILTIN
|
|
select LIB_COMPILER_RT
|
|
---help---
|
|
Compile the LLVM Compiler-rt library into the OS.
|
|
|
|
config BUILTIN_TOOLCHAIN
|
|
bool "Link toolchain builtin library to the OS"
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Code coverage analysis support"
|
|
default COVERAGE_NONE
|
|
---help---
|
|
Select the code coverage analysis library
|
|
|
|
config COVERAGE_COMPILER_RT
|
|
bool "Builtin libclang_rt.profile"
|
|
select LIB_BUILTIN
|
|
select LIB_COMPILER_RT
|
|
---help---
|
|
Compile the LLVM Compiler-rt library into the OS.
|
|
Support adding native rich compilation options "-fprofile-xxx"
|
|
|
|
config COVERAGE_MINI
|
|
bool "Builtin code coverage analysis mini library"
|
|
select LIB_BUILTIN
|
|
---help---
|
|
This is a mini version of the library, which is
|
|
used for code coverage analysis. If the toolchain
|
|
is clang, only support the compilation option
|
|
"-fprofile-instr-generate -fcoverage-mapping"
|
|
|
|
config COVERAGE_TOOLCHAIN
|
|
bool "Link toolchain gcov library to the OS"
|
|
---help---
|
|
Link the toolchain coverage library to the OS.
|
|
|
|
config COVERAGE_NONE
|
|
bool "Disable coverage function"
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Builtin profile support"
|
|
default PROFILE_NONE
|
|
---help---
|
|
Select the profile library
|
|
|
|
config PROFILE_MINI
|
|
bool "Enable mini gprof profiling"
|
|
select LIB_BUILTIN
|
|
---help---
|
|
Enable gprof profiling support. This will cause the compiler to
|
|
generate additional code to support profiling. This will also
|
|
cause the linker to include the gmon.out file in the final
|
|
executable.
|
|
Add the "-pg" parameter to the Makefile when compiling to obtain
|
|
the function call graph of the specified module. If you do this,
|
|
please enable "CONFIG_FRAME_POINTER"
|
|
|
|
config PROFILE_NONE
|
|
bool "None profile support"
|
|
|
|
endchoice
|
|
|
|
config PROFILE_ALL
|
|
bool "Enable gprof call graph for all modules"
|
|
depends on FRAME_POINTER && !PROFILE_NONE
|
|
default n
|
|
---help---
|
|
Enable gprof profiling for all code, it will instrument
|
|
all code, which will cause a large performance penalty for the code.
|
|
You can add the '-pg' parameter to the specified module in the
|
|
makefile to only analyze the content of the module.
|
|
|
|
config LIB_COMPILER_RT_VERSION
|
|
string "Select LLVM Compiler-rt version"
|
|
depends on LIB_COMPILER_RT
|
|
default "17.0.1"
|
|
|
|
config LIB_COMPILER_RT_HAS_BFLOAT16
|
|
bool "Enable support for bfloat16 in Compiler-rt"
|
|
depends on LIB_COMPILER_RT
|
|
default n
|