From: Dave Hansen <dave@linux.vnet.ibm.com>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-arch@vger.kernel.org, Dave Hansen <dave@linux.vnet.ibm.com>
Subject: [PATCH 7/7] group locking debugging options
Date: Mon, 17 Dec 2012 13:22:14 -0500 [thread overview]
Message-ID: <20121217182214.479F942A@kernel.stglabs.ibm.com> (raw)
In-Reply-To: <20121217182206.91AA150A@kernel.stglabs.ibm.com>
There are quite a few of these, and we want to make sure that
there is one-stop-shopping for lock debugging.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
---
linux-2.6.git-dave/lib/Kconfig.debug | 120 ++++++++++++++++++-----------------
1 file changed, 62 insertions(+), 58 deletions(-)
diff -puN lib/Kconfig.debug~order-lock-debugging-options lib/Kconfig.debug
--- linux-2.6.git/lib/Kconfig.debug~order-lock-debugging-options 2012-12-17 12:36:54.393387876 -0500
+++ linux-2.6.git-dave/lib/Kconfig.debug 2012-12-17 12:36:54.401387943 -0500
@@ -694,6 +694,8 @@ config DEBUG_PREEMPT
if kernel code uses it in a preemption-unsafe way. Also, the kernel
will detect preemption count underflows.
+menu "Lock Debugging (spinlocks, mutexes, etc...)"
+
config DEBUG_RT_MUTEXES
bool "RT Mutex debugging, deadlock detection"
depends on DEBUG_KERNEL && RT_MUTEXES
@@ -786,6 +788,66 @@ config PROVE_LOCKING
For more details, see Documentation/lockdep-design.txt.
+config LOCKDEP
+ bool
+ depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
+ select STACKTRACE
+ select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE
+ select KALLSYMS
+ select KALLSYMS_ALL
+
+config LOCK_STAT
+ bool "Lock usage statistics"
+ depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
+ select LOCKDEP
+ select DEBUG_SPINLOCK
+ select DEBUG_MUTEXES
+ select DEBUG_LOCK_ALLOC
+ default n
+ help
+ This feature enables tracking lock contention points
+
+ For more details, see Documentation/lockstat.txt
+
+ This also enables lock events required by "perf lock",
+ subcommand of perf.
+ If you want to use "perf lock", you also need to turn on
+ CONFIG_EVENT_TRACING.
+
+ CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
+ (CONFIG_LOCKDEP defines "acquire" and "release" events.)
+
+config DEBUG_LOCKDEP
+ bool "Lock dependency engine debugging"
+ depends on DEBUG_KERNEL && LOCKDEP
+ help
+ If you say Y here, the lock dependency engine will do
+ additional runtime checks to debug itself, at the price
+ of more runtime overhead.
+
+config DEBUG_ATOMIC_SLEEP
+ bool "Sleep inside atomic section checking"
+ select PREEMPT_COUNT
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here, various routines which may sleep will become very
+ noisy if they are called inside atomic sections: when a spinlock is
+ held, inside an rcu read side critical section, inside preempt disabled
+ sections, inside an interrupt, etc...
+
+config DEBUG_KERNEL_API_SELFTESTS
+ bool "Locking API boot-time self-tests"
+ depends on DEBUG_KERNEL
+ help
+ Say Y here if you want the kernel to run a short self-test during
+ bootup. The self-test checks whether common types of locking bugs
+ are detected by debugging mechanisms or not. (if you disable
+ lock debugging then those bugs wont be detected of course.)
+ The following locking APIs are covered: spinlocks, rwlocks,
+ mutexes and rwsems.
+
+endmenu # lock debugging
+
menu "RCU Debugging"
config PROVE_RCU
@@ -923,70 +985,12 @@ config RCU_TRACE
endmenu # RCU Debugging
-config LOCKDEP
- bool
- depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
- select STACKTRACE
- select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE
- select KALLSYMS
- select KALLSYMS_ALL
-
-config LOCK_STAT
- bool "Lock usage statistics"
- depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
- select LOCKDEP
- select DEBUG_SPINLOCK
- select DEBUG_MUTEXES
- select DEBUG_LOCK_ALLOC
- default n
- help
- This feature enables tracking lock contention points
-
- For more details, see Documentation/lockstat.txt
-
- This also enables lock events required by "perf lock",
- subcommand of perf.
- If you want to use "perf lock", you also need to turn on
- CONFIG_EVENT_TRACING.
-
- CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
- (CONFIG_LOCKDEP defines "acquire" and "release" events.)
-
-config DEBUG_LOCKDEP
- bool "Lock dependency engine debugging"
- depends on DEBUG_KERNEL && LOCKDEP
- help
- If you say Y here, the lock dependency engine will do
- additional runtime checks to debug itself, at the price
- of more runtime overhead.
-
config TRACE_IRQFLAGS
bool
help
Enables hooks to interrupt enabling and disabling for
either tracing or lock debugging.
-config DEBUG_ATOMIC_SLEEP
- bool "Sleep inside atomic section checking"
- select PREEMPT_COUNT
- depends on DEBUG_KERNEL
- help
- If you say Y here, various routines which may sleep will become very
- noisy if they are called inside atomic sections: when a spinlock is
- held, inside an rcu read side critical section, inside preempt disabled
- sections, inside an interrupt, etc...
-
-config DEBUG_LOCKING_API_SELFTESTS
- bool "Locking API boot-time self-tests"
- depends on DEBUG_KERNEL
- help
- Say Y here if you want the kernel to run a short self-test during
- bootup. The self-test checks whether common types of locking bugs
- are detected by debugging mechanisms or not. (if you disable
- lock debugging then those bugs wont be detected of course.)
- The following locking APIs are covered: spinlocks, rwlocks,
- mutexes and rwsems.
-
config STACKTRACE
bool
depends on STACKTRACE_SUPPORT
diff -puN MAINTAINERS~order-lock-debugging-options MAINTAINERS
_
prev parent reply other threads:[~2012-12-17 18:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 18:22 [PATCH 0/7] Put "Kernel hacking" Kconfig menu on a diet Dave Hansen
2012-12-17 18:22 ` [PATCH 1/7] move debugfs to filesystems menu (fs/Kconfig) Dave Hansen
2012-12-18 2:21 ` Greg KH
2012-12-17 18:22 ` [PATCH 2/7] consolidate per-arch stack overflow debugging options Dave Hansen
2012-12-17 18:22 ` [PATCH 3/7] order memory debugging Kconfig options Dave Hansen
2012-12-17 18:22 ` [PATCH 4/7] consolidate RCU " Dave Hansen
2012-12-17 18:22 ` [PATCH 5/7] consolidate runtime testing configs Dave Hansen
2012-12-17 18:22 ` [PATCH 6/7] consolidate compilation option configs Dave Hansen
2012-12-17 18:22 ` Dave Hansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121217182214.479F942A@kernel.stglabs.ibm.com \
--to=dave@linux.vnet.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.