build: Add STACK_USAGE(-fstack-usage) to assist the stack analysis
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
ab059a7ba3
commit
fd64e38072
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,6 +27,7 @@
|
||||
*.wsp
|
||||
*.ddc
|
||||
*.dds
|
||||
*.su
|
||||
*~
|
||||
.depend
|
||||
/.config
|
||||
|
7
Kconfig
7
Kconfig
@ -1945,6 +1945,13 @@ config STACK_CANARIES
|
||||
Enabling this option can result in a significant increase
|
||||
in footprint and an associated decrease in performance.
|
||||
|
||||
config STACK_USAGE
|
||||
bool "Generate stack usage information"
|
||||
help
|
||||
Generate an extra file that specifies the maximum amount of stack used,
|
||||
on a per-function basis. Please use https://github.com/HBehrens/puncover
|
||||
or tools/showstack.sh to generate the more useful report.
|
||||
|
||||
config ARCH_HAVE_HEAPCHECK
|
||||
bool
|
||||
default n
|
||||
|
@ -54,6 +54,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STACK_USAGE),y)
|
||||
ARCHOPTIMIZATION += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
@ -63,6 +63,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STACK_USAGE),y)
|
||||
ARCHOPTIMIZATION += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
@ -75,6 +75,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STACK_USAGE),y)
|
||||
ARCHOPTIMIZATION += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
@ -75,6 +75,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STACK_USAGE),y)
|
||||
ARCHOPTIMIZATION += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
@ -67,6 +67,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STACK_USAGE),y)
|
||||
ARCHOPTIMIZATION += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user