mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 05:08:41 +08:00
gcov: Fix typographical errors
1. CONFIG_ARCH_COVERAGE has been replaced by CONFIG_SCHED_GCOV 2. Delete the SIM-specific GCOV_ALL configuration and change it to a universal configuration for all architectures Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
27685aa179
commit
e3d7d23618
13 changed files with 21 additions and 20 deletions
|
@ -117,7 +117,7 @@ if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL
|
||||||
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GCOV)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL
|
||||||
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GCOV)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL
|
||||||
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GCOV)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ if(${CONFIG_STACK_USAGE_WARNING})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GCOV)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -90,13 +90,6 @@ config SIM_UBSAN_DUMMY
|
||||||
---help---
|
---help---
|
||||||
Keep SIM_UBSAN compile time but disable runtime actions.
|
Keep SIM_UBSAN compile time but disable runtime actions.
|
||||||
|
|
||||||
config SIM_GCOV_ALL
|
|
||||||
bool "Enable code coverage for the entire image"
|
|
||||||
default n
|
|
||||||
---help---
|
|
||||||
This option activates code coverage instrumentation for the
|
|
||||||
entire image.
|
|
||||||
|
|
||||||
config SIM_GPROF
|
config SIM_GPROF
|
||||||
bool "Enable gprof"
|
bool "Enable gprof"
|
||||||
depends on !SCHED_GPROF
|
depends on !SCHED_GPROF
|
||||||
|
|
|
@ -86,7 +86,7 @@ if(CONFIG_STACK_USAGE_WARNING)
|
||||||
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GCOV)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ if(CONFIG_STACK_CANARIES)
|
||||||
add_compile_options(-fstack-protector-all)
|
add_compile_options(-fstack-protector-all)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_ARCH_COVERAGE)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ if(CONFIG_TRICORE_TOOLCHAIN_GNU)
|
||||||
OUTPUT_VARIABLE extra_library)
|
OUTPUT_VARIABLE extra_library)
|
||||||
list(APPEND EXTRA_LIB ${extra_library})
|
list(APPEND EXTRA_LIB ${extra_library})
|
||||||
endif()
|
endif()
|
||||||
if(CONFIG_ARCH_COVERAGE)
|
if(CONFIG_SCHED_GCOV)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS}
|
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS}
|
||||||
--print-file-name=libgcov.a
|
--print-file-name=libgcov.a
|
||||||
|
|
|
@ -58,7 +58,7 @@ ifneq ($(CONFIG_STACK_USAGE_WARNING),0)
|
||||||
ARCHOPTIMIZATION += -Wstack-usage=$(CONFIG_STACK_USAGE_WARNING)
|
ARCHOPTIMIZATION += -Wstack-usage=$(CONFIG_STACK_USAGE_WARNING)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
ifeq ($(CONFIG_SCHED_GCOV_ALL),y)
|
||||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
ifeq ($(CONFIG_SCHED_GCOV),y)
|
||||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ if(${CONFIG_STACK_USAGE_WARNING})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GCOV)
|
if(CONFIG_SCHED_GCOV_ALL)
|
||||||
add_compile_options(-fprofile-generate -ftest-coverage)
|
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ ifneq ($(CONFIG_STACK_USAGE_WARNING),0)
|
||||||
ARCHOPTIMIZATION += -Wstack-usage=$(CONFIG_STACK_USAGE_WARNING)
|
ARCHOPTIMIZATION += -Wstack-usage=$(CONFIG_STACK_USAGE_WARNING)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SIM_GCOV_ALL),y)
|
ifeq ($(CONFIG_SCHED_GCOV_ALL),y)
|
||||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1355,6 +1355,14 @@ config SCHED_GCOV
|
||||||
"-fprofile-generate -ftest-coverage" compilation parameters
|
"-fprofile-generate -ftest-coverage" compilation parameters
|
||||||
to the file to be analyzed.
|
to the file to be analyzed.
|
||||||
|
|
||||||
|
config SCHED_GCOV_ALL
|
||||||
|
bool "Enable gcov call graph for all modules"
|
||||||
|
depends on SCHED_GCOV
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Enable gcov profiling for all code, it will instrument
|
||||||
|
all code, which will cause a large performance penalty for the code.
|
||||||
|
|
||||||
config SCHED_GPROF
|
config SCHED_GPROF
|
||||||
bool "Enable gprof profiling"
|
bool "Enable gprof profiling"
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -620,7 +620,7 @@ define DOWNLOAD
|
||||||
$(ECHO_END)
|
$(ECHO_END)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# CLONE - Git clone repository. Initializes a new Git repository in the
|
# CLONE - Git clone repository. Initializes a new Git repository in the
|
||||||
# folder on your local machine and populates it with the contents
|
# folder on your local machine and populates it with the contents
|
||||||
# of the central repository.
|
# of the central repository.
|
||||||
# The third argument is an storage path. The second argument is used
|
# The third argument is an storage path. The second argument is used
|
||||||
|
@ -784,7 +784,7 @@ else
|
||||||
CONVERT_PATH = $1
|
CONVERT_PATH = $1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Upper/Lower case string, add the `UL` prefix to private function
|
# Upper/Lower case string, add the `UL` prefix to private function
|
||||||
|
|
||||||
ULPOP = $(wordlist 3,$(words $(1)),$(1))
|
ULPOP = $(wordlist 3,$(words $(1)),$(1))
|
||||||
ULSUB = $(subst $(word 1,$(1)),$(word 2,$(1)),$(2))
|
ULSUB = $(subst $(word 1,$(1)),$(word 2,$(1)),$(2))
|
||||||
|
|
Loading…
Reference in a new issue