unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
static struct circular_queue lock_cq;
-
+unsigned int max_bfs_queue_depth;
static int __bfs(struct lock_list *source_entry,
void *data,
int (*match)(struct lock_list *entry, void *data),
list_for_each_entry(entry, head, entry) {
if (!lock_accessed(entry)) {
+ unsigned int cq_depth;
mark_lock_accessed(entry, lock);
if (match(entry, data)) {
*target_entry = entry;
ret = -1;
goto exit;
}
+ cq_depth = __cq_get_elem_count(cq);
+ if (max_bfs_queue_depth < cq_depth)
+ max_bfs_queue_depth = cq_depth;
}
}
}
#endif
+extern unsigned int max_bfs_queue_depth;
extern unsigned long nr_list_entries;
extern struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
extern unsigned long bfs_accessed[];
return 0;
}
-static inline int __cq_get_elem_count(struct circular_queue *cq)
+static inline unsigned int __cq_get_elem_count(struct circular_queue *cq)
{
return (cq->rear - cq->front)&(MAX_CIRCULAR_QUE_SIZE-1);
}
max_lockdep_depth);
seq_printf(m, " max recursion depth: %11u\n",
max_recursion_depth);
+ seq_printf(m, " max bfs queue depth: %11u\n",
+ max_bfs_queue_depth);
lockdep_stats_debug_show(m);
seq_printf(m, " debug_locks: %11u\n",
debug_locks);