aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep_proc.c
diff options
context:
space:
mode:
authorHuang, Ying <ying.huang@intel.com>2008-06-22 23:20:54 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-23 19:28:20 -0400
commitcd1a28e8457e6ebf72c48d84d4e736307e86436e (patch)
tree09371914495f7e3803016516ba887b593ea64a9b /kernel/lockdep_proc.c
parent443cd507ce7f78c6f8742b72736585c031d5a921 (diff)
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 = {
178 .release = seq_release, 178 .release = seq_release,
179}; 179};
180 180
181#ifdef CONFIG_PROVE_LOCKING
181static void *lc_next(struct seq_file *m, void *v, loff_t *pos) 182static void *lc_next(struct seq_file *m, void *v, loff_t *pos)
182{ 183{
183 struct lock_chain *chain; 184 struct lock_chain *chain;
@@ -264,6 +265,7 @@ static const struct file_operations proc_lockdep_chains_operations = {
264 .llseek = seq_lseek, 265 .llseek = seq_lseek,
265 .release = seq_release, 266 .release = seq_release,
266}; 267};
268#endif /* CONFIG_PROVE_LOCKING */
267 269
268static void lockdep_stats_debug_show(struct seq_file *m) 270static void lockdep_stats_debug_show(struct seq_file *m)
269{ 271{
@@ -382,7 +384,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
382 seq_printf(m, " dependency chains: %11lu [max: %lu]\n", 384 seq_printf(m, " dependency chains: %11lu [max: %lu]\n",
383 nr_lock_chains, MAX_LOCKDEP_CHAINS); 385 nr_lock_chains, MAX_LOCKDEP_CHAINS);
384 seq_printf(m, " dependency chain hlocks: %11d [max: %lu]\n", 386 seq_printf(m, " dependency chain hlocks: %11d [max: %lu]\n",
385 atomic_read(&nr_chain_hlocks), MAX_LOCKDEP_CHAIN_HLOCKS); 387 nr_chain_hlocks, MAX_LOCKDEP_CHAIN_HLOCKS);
386#endif 388#endif
387 389
388#ifdef CONFIG_TRACE_IRQFLAGS 390#ifdef CONFIG_TRACE_IRQFLAGS
@@ -750,8 +752,10 @@ static const struct file_operations proc_lock_stat_operations = {
750static int __init lockdep_proc_init(void) 752static int __init lockdep_proc_init(void)
751{ 753{
752 proc_create("lockdep", S_IRUSR, NULL, &proc_lockdep_operations); 754 proc_create("lockdep", S_IRUSR, NULL, &proc_lockdep_operations);
755#ifdef CONFIG_PROVE_LOCKING
753 proc_create("lockdep_chains", S_IRUSR, NULL, 756 proc_create("lockdep_chains", S_IRUSR, NULL,
754 &proc_lockdep_chains_operations); 757 &proc_lockdep_chains_operations);
758#endif
755 proc_create("lockdep_stats", S_IRUSR, NULL, 759 proc_create("lockdep_stats", S_IRUSR, NULL,
756 &proc_lockdep_stats_operations); 760 &proc_lockdep_stats_operations);
757 761