lockdep: Introduce print_shortest_lock_dependencies

Since the shortest lock dependencies' path may be obtained by BFS,
we print the shortest one by print_shortest_lock_dependencies().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1246201486-7308-7-git-send-email-tom.leiming@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ming Lei
2009-07-16 15:44:29 +02:00
committed by Peter Zijlstra
parent d7aaba140a
commit 24208ca767
2 changed files with 69 additions and 28 deletions

View File

@@ -219,9 +219,9 @@ static inline struct lock_list *get_lock_parent(struct lock_list *child)
return child->parent;
}
static inline unsigned long get_lock_depth(struct lock_list *child)
static inline int get_lock_depth(struct lock_list *child)
{
unsigned long depth = 0;
int depth = 0;
struct lock_list *parent;
while ((parent = get_lock_parent(child))) {