summaryrefslogtreecommitdiffstats
path: root/kernel/lockdep_proc.c
diff options
context:
space:
mode:
authorHuang, Ying <ying.huang@intel.com>2008-06-23 05:20:54 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-24 01:28:20 +0200
commitcd1a28e8457e6ebf72c48d84d4e736307e86436e (patch)
tree09371914495f7e3803016516ba887b593ea64a9b /kernel/lockdep_proc.c
parentlockdep: add lock_class information to lock_chain and output it (diff)
downloadlinux-cd1a28e8457e6ebf72c48d84d4e736307e86436e.tar.xz
linux-cd1a28e8457e6ebf72c48d84d4e736307e86436e.zip
lockdep: add lock_class information to lock_chain and output it
It is based on x86/master branch of git-x86 tree, and has been tested on x86_64 platform. ChangeLog: v2: - Enclosing proc file system related code into CONFIG_PROVE_LOCKING. - Fix nr_chain_hlocks update code. Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/lockdep_proc.c')
-rw-r--r--kernel/lockdep_proc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
index 14d052c8a835..9b0e940e2545 100644
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -178,6 +178,7 @@ static const struct file_operations proc_lockdep_operations = {
.release = seq_release,
};
+#ifdef CONFIG_PROVE_LOCKING
static void *lc_next(struct seq_file *m, void *v, loff_t *pos)
{
struct lock_chain *chain;
@@ -264,6 +265,7 @@ static const struct file_operations proc_lockdep_chains_operations = {
.llseek = seq_lseek,
.release = seq_release,
};
+#endif /* CONFIG_PROVE_LOCKING */
static void lockdep_stats_debug_show(struct seq_file *m)
{
@@ -382,7 +384,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
seq_printf(m, " dependency chains: %11lu [max: %lu]\n",
nr_lock_chains, MAX_LOCKDEP_CHAINS);
seq_printf(m, " dependency chain hlocks: %11d [max: %lu]\n",
- atomic_read(&nr_chain_hlocks), MAX_LOCKDEP_CHAIN_HLOCKS);
+ nr_chain_hlocks, MAX_LOCKDEP_CHAIN_HLOCKS);
#endif
#ifdef CONFIG_TRACE_IRQFLAGS
@@ -750,8 +752,10 @@ static const struct file_operations proc_lock_stat_operations = {
static int __init lockdep_proc_init(void)
{
proc_create("lockdep", S_IRUSR, NULL, &proc_lockdep_operations);
+#ifdef CONFIG_PROVE_LOCKING
proc_create("lockdep_chains", S_IRUSR, NULL,
&proc_lockdep_chains_operations);
+#endif
proc_create("lockdep_stats", S_IRUSR, NULL,
&proc_lockdep_stats_operations);