Skip to content

Commit

Permalink
Generate stack usage information only when enabled
Browse files Browse the repository at this point in the history
This will only generate the .su files when CONFIG_STACK_USAGE
is specified, otherwise the tree will be full of .su files.

Change-Id: I3ffc7a7f5ab09aaae49ff65e8ad5de0832370777
Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Feb 6, 2016
1 parent cf81e1f commit 9fe306b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)

# generate an extra file that specifies the maximum amount of stack used,
# on a per-function basis.
ifdef CONFIG_STACK_USAGE
KBUILD_CFLAGS += $(call cc-option,-fstack-usage)
endif


# disallow errors like 'EXPORT_GPL(foo);' with missing header
Expand Down
7 changes: 7 additions & 0 deletions misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ config DEBUG
only disables optimization, more debugging variants can be selected
from here to allow more debugging.

config STACK_USAGE
bool "Generate stack usage information"
default n
help
Generate an extra file that specifies the maximum amount of stack used,
on a per-function basis.

config PRINTK
bool
prompt "Send printk() to console"
Expand Down

0 comments on commit 9fe306b

Please sign in to comment.