* [BUGFIX] lockdep: output lock_class key instead of address for forward dependency output
@ 2008-06-13 6:40 Huang, Ying
2008-06-13 6:58 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Huang, Ying @ 2008-06-13 6:40 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar; +Cc: linux-kernel
The key instead of address of lock_class should be output in
/proc/lockdep when forward dependency is output, because key is
output for lock_class itself as identifier too.
This patch is based on x86/auto-latest branch of git-x86 tree, and has
been tested on x86_64 platform.
Signed-off-by: Huang Ying <ying.huang@intel.com>
---
kernel/lockdep_proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -139,7 +139,7 @@ static int l_show(struct seq_file *m, vo
list_for_each_entry(entry, &class->locks_after, entry) {
if (entry->distance == 1) {
- seq_printf(m, " -> [%p] ", entry->class);
+ seq_printf(m, " -> [%p] ", entry->class->key);
print_name(m, entry->class);
seq_puts(m, "\n");
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [BUGFIX] lockdep: output lock_class key instead of address for forward dependency output
2008-06-13 6:40 [BUGFIX] lockdep: output lock_class key instead of address for forward dependency output Huang, Ying
@ 2008-06-13 6:58 ` Ingo Molnar
2008-06-13 7:26 ` Huang, Ying
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-06-13 6:58 UTC (permalink / raw)
To: Huang, Ying; +Cc: Peter Zijlstra, linux-kernel
* Huang, Ying <ying.huang@intel.com> wrote:
> The key instead of address of lock_class should be output in
> /proc/lockdep when forward dependency is output, because key is
> output for lock_class itself as identifier too.
>
> This patch is based on x86/auto-latest branch of git-x86 tree, and has
> been tested on x86_64 platform.
applied to tip/core/locking - thanks Ying.
i'm wondering, can entry->class never be NULL here?
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUGFIX] lockdep: output lock_class key instead of address for forward dependency output
2008-06-13 6:58 ` Ingo Molnar
@ 2008-06-13 7:26 ` Huang, Ying
0 siblings, 0 replies; 3+ messages in thread
From: Huang, Ying @ 2008-06-13 7:26 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, linux-kernel
On Fri, 2008-06-13 at 08:58 +0200, Ingo Molnar wrote:
> * Huang, Ying <ying.huang@intel.com> wrote:
>
> > The key instead of address of lock_class should be output in
> > /proc/lockdep when forward dependency is output, because key is
> > output for lock_class itself as identifier too.
> >
> > This patch is based on x86/auto-latest branch of git-x86 tree, and has
> > been tested on x86_64 platform.
>
> applied to tip/core/locking - thanks Ying.
>
> i'm wondering, can entry->class never be NULL here?
As far as I know, it can never be NULL. Because entry is added into
class->locks_after in following call chain:
lock_acquire -> __lock_acquire -> validate_chain -> check_prevs_add ->
check_prev_add -> add_lock_to_list
in __lock_acquire the lock_class is look up or registered from
lockdep_map and put in held_lock, which is used in following function in
call chain.
Best Regards,
Huang Ying
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-13 7:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13 6:40 [BUGFIX] lockdep: output lock_class key instead of address for forward dependency output Huang, Ying
2008-06-13 6:58 ` Ingo Molnar
2008-06-13 7:26 ` Huang, Ying
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.