arch: Add ARCH_COVERAGE_ALL option
so the user could disable the full image instrumentation, but enable the instrumentation by files or directories. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
f1355680ca
commit
c44a7cbf88
12
arch/Kconfig
12
arch/Kconfig
@ -304,6 +304,18 @@ config ARCH_COVERAGE
|
||||
---help---
|
||||
Generate code coverage
|
||||
|
||||
config ARCH_COVERAGE_ALL
|
||||
bool "Enable code coverage for the entire image"
|
||||
depends on ARCH_COVERAGE
|
||||
default y
|
||||
---help---
|
||||
This option activates code coverage instrumentation for the
|
||||
entire image. If you don't enable this option, you have to
|
||||
explicitly specify "-fprofile-generate -ftest-coverage" for
|
||||
the files/directories you want to check. Enabling this option
|
||||
will get image size increased and performance decreased
|
||||
significantly.
|
||||
|
||||
comment "Architecture Options"
|
||||
|
||||
config ARCH_NOINTC
|
||||
|
@ -75,7 +75,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -79,7 +79,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -120,7 +120,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -81,7 +81,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -69,7 +69,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -81,7 +81,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -58,7 +58,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -63,7 +63,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -75,7 +75,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -75,7 +75,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
@ -67,7 +67,7 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user