Skip to content

Commit

Permalink
gcov: disable CONFIG_CONSTRUCTORS when not needed by CONFIG_GCOV_KERNEL
Browse files Browse the repository at this point in the history
CONFIG_CONSTRUCTORS controls support for running constructor functions at
kernel init time.  According to commit b99b87f ("kernel:
constructor support"), gcov (CONFIG_GCOV_KERNEL) needs this.  However,
CONFIG_CONSTRUCTORS currently defaults to y, with no option to disable it,
and CONFIG_GCOV_KERNEL depends on it.  Instead, default it to n and have
CONFIG_GCOV_KERNEL select it, so that the normal case of
CONFIG_GCOV_KERNEL=n will result in CONFIG_CONSTRUCTORS=n.

Observed in the short list of =y values in a minimal kernel configuration.

Signed-off-by: Josh Triplett <[email protected]>
Acked-by: WANG Cong <[email protected]>
Acked-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
joshtriplett authored and torvalds committed Jun 16, 2011
1 parent b0461a4 commit d2c3225
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ config DEFCONFIG_LIST
config CONSTRUCTORS
bool
depends on !UML
default y

config HAVE_IRQ_WORK
bool
Expand Down
3 changes: 2 additions & 1 deletion kernel/gcov/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ menu "GCOV-based kernel profiling"

config GCOV_KERNEL
bool "Enable gcov-based kernel profiling"
depends on DEBUG_FS && CONSTRUCTORS
depends on DEBUG_FS
select CONSTRUCTORS
default n
---help---
This option enables gcov-based code profiling (e.g. for code coverage
Expand Down

0 comments on commit d2c3225

Please sign in to comment.