[kernel] Disable kmemleak for release builds

Dave Jones davej at fedoraproject.org
Tue Jan 17 19:03:25 UTC 2012


commit 8b6438f7bd85891b18a3cb90584c069bf5395f61
Author: Dave Jones <davej at redhat.com>
Date:   Tue Jan 17 13:59:44 2012 -0500

    Disable kmemleak for release builds

 Makefile         |    1 +
 Makefile.release |    3 +++
 config-debug     |    6 ++++++
 config-generic   |    5 -----
 config-nodebug   |    6 ++++++
 5 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/Makefile b/Makefile
index ce580e4..d605832 100644
--- a/Makefile
+++ b/Makefile
@@ -93,6 +93,7 @@ debug:
 	@perl -pi -e 's/# CONFIG_DEBUG_ATOMIC_SLEEP is not set/CONFIG_DEBUG_ATOMIC_SLEEP=y/' config-nodebug
 	@perl -pi -e 's/# CONFIG_DETECT_HUNG_TASK is not set/CONFIG_DETECT_HUNG_TASK=y/' config-nodebug
 	@perl -pi -e 's/# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set/CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_KMEMLEAK is not set/CONFIG_DEBUG_KMEMLEAK=y/' config-nodebug
 
 	@# just in case we're going from extremedebug -> debug
 	@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
diff --git a/Makefile.release b/Makefile.release
index c718c36..dbb28b3 100644
--- a/Makefile.release
+++ b/Makefile.release
@@ -68,8 +68,11 @@ config-release:
 	@perl -pi -e 's/CONFIG_DEBUG_ATOMIC_SLEEP=y/# CONFIG_DEBUG_ATOMIC_SLEEP is not set/' config-nodebug
 	@perl -pi -e 's/CONFIG_DETECT_HUNG_TASK=y/# CONFIG_DETECT_HUNG_TASK is not set/' config-nodebug
 	@perl -pi -e 's/CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y/# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_KMEMLEAK=y/# CONFIG_DEBUG_KMEMLEAK is not set/' config-nodebug
 
+	# Undo anything that make extremedebug might have set
 	@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-debug
 	@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
 
+	# Change defaults back to sane things.
 	@perl -pi -e 's/CONFIG_NR_CPUS=512/CONFIG_NR_CPUS=256/' config-x86_64-generic
diff --git a/config-debug b/config-debug
index 19ae465..ca1ba2b 100644
--- a/config-debug
+++ b/config-debug
@@ -104,3 +104,9 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
 
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
+
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
+# CONFIG_DEBUG_KMEMLEAK_TEST is not set
+CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
+
diff --git a/config-generic b/config-generic
index 922593a..1a65a3a 100644
--- a/config-generic
+++ b/config-generic
@@ -3696,11 +3696,6 @@ CONFIG_HEADERS_CHECK=y
 
 # DEBUG options that don't get enabled/disabled with 'make debug/release'
 
-CONFIG_DEBUG_KMEMLEAK=y
-CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
-# CONFIG_DEBUG_KMEMLEAK_TEST is not set
-CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
-
 # This generates a huge amount of dmesg spew
 # CONFIG_DEBUG_KOBJECT is not set
 #
diff --git a/config-nodebug b/config-nodebug
index 4beecc2..0eb2532 100644
--- a/config-nodebug
+++ b/config-nodebug
@@ -104,3 +104,9 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
 
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
+
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
+# CONFIG_DEBUG_KMEMLEAK_TEST is not set
+CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
+


More information about the scm-commits mailing list