• Home
  • Raw
  • Download

Lines Matching refs:class

204 struct lock_class_stats lock_stats(struct lock_class *class)  in lock_stats()  argument
212 &per_cpu(cpu_lock_stats, cpu)[class - lock_classes]; in lock_stats()
233 void clear_lock_stats(struct lock_class *class) in clear_lock_stats() argument
239 &per_cpu(cpu_lock_stats, cpu)[class - lock_classes]; in clear_lock_stats()
243 memset(class->contention_point, 0, sizeof(class->contention_point)); in clear_lock_stats()
244 memset(class->contending_point, 0, sizeof(class->contending_point)); in clear_lock_stats()
247 static struct lock_class_stats *get_lock_stats(struct lock_class *class) in get_lock_stats() argument
249 return &get_cpu_var(cpu_lock_stats)[class - lock_classes]; in get_lock_stats()
352 static int class_filter(struct lock_class *class) in class_filter() argument
356 if (class->name_version == 1 && in class_filter()
357 !strcmp(class->name, "lockname")) in class_filter()
359 if (class->name_version == 1 && in class_filter()
360 !strcmp(class->name, "&struct->lockfield")) in class_filter()
368 static int verbose(struct lock_class *class) in verbose() argument
371 return class_filter(class); in verbose()
481 static char get_usage_char(struct lock_class *class, enum lock_usage_bit bit) in get_usage_char() argument
485 if (class->usage_mask & lock_flag(bit + 2)) in get_usage_char()
487 if (class->usage_mask & lock_flag(bit)) { in get_usage_char()
489 if (class->usage_mask & lock_flag(bit + 2)) in get_usage_char()
496 void get_usage_chars(struct lock_class *class, char usage[LOCK_USAGE_CHARS]) in get_usage_chars() argument
501 usage[i++] = get_usage_char(class, LOCK_USED_IN_##__STATE); \ in get_usage_chars()
502 usage[i++] = get_usage_char(class, LOCK_USED_IN_##__STATE##_READ); in get_usage_chars()
509 static void __print_lock_name(struct lock_class *class) in __print_lock_name() argument
514 name = class->name; in __print_lock_name()
516 name = __get_key_name(class->key, str); in __print_lock_name()
520 if (class->name_version > 1) in __print_lock_name()
521 printk("#%d", class->name_version); in __print_lock_name()
522 if (class->subclass) in __print_lock_name()
523 printk("/%d", class->subclass); in __print_lock_name()
527 static void print_lock_name(struct lock_class *class) in print_lock_name() argument
531 get_usage_chars(class, usage); in print_lock_name()
534 __print_lock_name(class); in print_lock_name()
582 static int very_verbose(struct lock_class *class) in very_verbose() argument
585 return class_filter(class); in very_verbose()
626 struct lock_class *class; in count_matching_names() local
632 list_for_each_entry(class, &all_lock_classes, lock_entry) { in count_matching_names()
633 if (new_class->key - new_class->subclass == class->key) in count_matching_names()
634 return class->name_version; in count_matching_names()
635 if (class->name && !strcmp(class->name, new_class->name)) in count_matching_names()
636 count = max(count, class->name_version); in count_matching_names()
652 struct lock_class *class; in look_up_lock_class() local
702 list_for_each_entry(class, hash_head, hash_entry) { in look_up_lock_class()
703 if (class->key == key) { in look_up_lock_class()
708 WARN_ON_ONCE(class->name != lock->name); in look_up_lock_class()
709 return class; in look_up_lock_class()
726 struct lock_class *class; in register_lock_class() local
729 class = look_up_lock_class(lock, subclass); in register_lock_class()
730 if (likely(class)) in register_lock_class()
758 list_for_each_entry(class, hash_head, hash_entry) in register_lock_class()
759 if (class->key == key) in register_lock_class()
776 class = lock_classes + nr_lock_classes++; in register_lock_class()
778 class->key = key; in register_lock_class()
779 class->name = lock->name; in register_lock_class()
780 class->subclass = subclass; in register_lock_class()
781 INIT_LIST_HEAD(&class->lock_entry); in register_lock_class()
782 INIT_LIST_HEAD(&class->locks_before); in register_lock_class()
783 INIT_LIST_HEAD(&class->locks_after); in register_lock_class()
784 class->name_version = count_matching_names(class); in register_lock_class()
789 list_add_tail_rcu(&class->hash_entry, hash_head); in register_lock_class()
793 list_add_tail_rcu(&class->lock_entry, &all_lock_classes); in register_lock_class()
795 if (verbose(class)) { in register_lock_class()
799 printk("\nnew class %p: %s", class->key, class->name); in register_lock_class()
800 if (class->name_version > 1) in register_lock_class()
801 printk("#%d", class->name_version); in register_lock_class()
817 lock->class_cache[0] = class; in register_lock_class()
819 lock->class_cache[subclass] = class; in register_lock_class()
825 if (DEBUG_LOCKS_WARN_ON(class->subclass != subclass)) in register_lock_class()
828 return class; in register_lock_class()
852 static int add_lock_to_list(struct lock_class *class, struct lock_class *this, in add_lock_to_list() argument
865 entry->class = this; in add_lock_to_list()
952 lock->class->dep_gen_id = lockdep_dependency_gen_id; in mark_lock_accessed()
961 return lock->class->dep_gen_id == lockdep_dependency_gen_id; in lock_accessed()
999 head = &source_entry->class->locks_after; in __bfs()
1001 head = &source_entry->class->locks_before; in __bfs()
1014 if (!lock->class) { in __bfs()
1020 head = &lock->class->locks_after; in __bfs()
1022 head = &lock->class->locks_before; in __bfs()
1082 print_lock_name(target->class); in print_circular_bug_entry()
1096 struct lock_class *parent = prt->class; in print_circular_lock_scenario()
1173 return entry->class == data; in class_equal()
1244 unsigned long lockdep_count_forward_deps(struct lock_class *class) in lockdep_count_forward_deps() argument
1250 this.class = class; in lockdep_count_forward_deps()
1271 unsigned long lockdep_count_backward_deps(struct lock_class *class) in lockdep_count_backward_deps() argument
1277 this.class = class; in lockdep_count_backward_deps()
1314 return entry->class->usage_mask & (1 << (enum lock_usage_bit)bit); in usage_match()
1365 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
1370 print_lock_name(class); in print_lock_class_header()
1371 printk(" ops: %lu", class->ops); in print_lock_class_header()
1375 if (class->usage_mask & (1 << bit)) { in print_lock_class_header()
1380 print_stack_trace(class->usage_traces + bit, len); in print_lock_class_header()
1386 print_ip_sym((unsigned long)class->key); in print_lock_class_header()
1403 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
1426 struct lock_class *safe_class = safe_entry->class; in print_irq_lock_scenario()
1427 struct lock_class *unsafe_class = unsafe_entry->class; in print_irq_lock_scenario()
1515 print_lock_name(backwards_entry->class); in print_bad_irq_dependency()
1518 print_stack_trace(backwards_entry->class->usage_traces + bit1, 1); in print_bad_irq_dependency()
1521 print_lock_name(forwards_entry->class); in print_bad_irq_dependency()
1525 print_stack_trace(forwards_entry->class->usage_traces + bit2, 1); in print_bad_irq_dependency()
1563 this.class = hlock_class(prev); in check_usage()
1571 that.class = hlock_class(next); in check_usage()
1834 this.class = hlock_class(next); in check_prev_add()
1864 if (entry->class == hlock_class(next)) { in check_prev_add()
2004 struct lock_class *class = hlock_class(hlock); in lookup_chain_cache() local
2025 if (very_verbose(class)) in lookup_chain_cache()
2029 class->key, class->name); in lookup_chain_cache()
2033 if (very_verbose(class)) in lookup_chain_cache()
2035 (unsigned long long)chain_key, class->key, class->name); in lookup_chain_cache()
2077 chain_hlocks[chain->base + j] = class - lock_classes; in lookup_chain_cache()
2203 struct lock_class *class = hlock_class(lock); in print_usage_bug_scenario() local
2209 __print_lock_name(class); in print_usage_bug_scenario()
2213 __print_lock_name(class); in print_usage_bug_scenario()
2302 print_lock_name(other->class); in print_irq_inversion_bug()
2320 middle ? middle->class : root->class, other->class); in print_irq_inversion_bug()
2323 middle ? middle->class : other->class, root->class); in print_irq_inversion_bug()
2351 root.class = hlock_class(this); in check_usage_forwards()
2375 root.class = hlock_class(this); in check_usage_backwards()
2399 static int HARDIRQ_verbose(struct lock_class *class) in HARDIRQ_verbose() argument
2402 return class_filter(class); in HARDIRQ_verbose()
2407 static int SOFTIRQ_verbose(struct lock_class *class) in SOFTIRQ_verbose() argument
2410 return class_filter(class); in SOFTIRQ_verbose()
2415 static int RECLAIM_FS_verbose(struct lock_class *class) in RECLAIM_FS_verbose() argument
2418 return class_filter(class); in RECLAIM_FS_verbose()
2425 static int (*state_verbose_f[])(struct lock_class *class) = {
2433 struct lock_class *class) in state_verbose() argument
2435 return state_verbose_f[bit >> 2](class); in state_verbose()
3049 struct lock_class *class = NULL; in __lock_acquire() local
3074 class = lock->class_cache[subclass]; in __lock_acquire()
3078 if (unlikely(!class)) { in __lock_acquire()
3079 class = register_lock_class(lock, subclass, 0); in __lock_acquire()
3080 if (!class) in __lock_acquire()
3083 atomic_inc((atomic_t *)&class->ops); in __lock_acquire()
3084 if (very_verbose(class)) { in __lock_acquire()
3085 printk("\nacquire class [%p] %s", class->key, class->name); in __lock_acquire()
3086 if (class->name_version > 1) in __lock_acquire()
3087 printk("#%d", class->name_version); in __lock_acquire()
3104 class_idx = class - lock_classes + 1; in __lock_acquire()
3123 if (DEBUG_LOCKS_WARN_ON(!class)) in __lock_acquire()
3156 id = class - lock_classes; in __lock_acquire()
3267 struct lock_class *class = lock->class_cache[0]; in match_held_lock() local
3269 if (!class) in match_held_lock()
3270 class = look_up_lock_class(lock, 0); in match_held_lock()
3278 if (!class) in match_held_lock()
3289 if (hlock->class_idx == class - lock_classes + 1) in match_held_lock()
3303 struct lock_class *class; in __lock_set_class() local
3331 class = register_lock_class(lock, subclass, 0); in __lock_set_class()
3332 hlock->class_idx = class - lock_classes + 1; in __lock_set_class()
3863 static void zap_class(struct lock_class *class) in zap_class() argument
3872 if (list_entries[i].class == class) in zap_class()
3878 list_del_rcu(&class->hash_entry); in zap_class()
3879 list_del_rcu(&class->lock_entry); in zap_class()
3881 class->key = NULL; in zap_class()
3891 struct lock_class *class, *next; in lockdep_free_key_range() local
3907 list_for_each_entry_safe(class, next, head, hash_entry) { in lockdep_free_key_range()
3908 if (within(class->key, start, size)) in lockdep_free_key_range()
3909 zap_class(class); in lockdep_free_key_range()
3910 else if (within(class->name, start, size)) in lockdep_free_key_range()
3911 zap_class(class); in lockdep_free_key_range()
3922 struct lock_class *class, *next; in lockdep_reset_lock() local
3937 class = look_up_lock_class(lock, j); in lockdep_reset_lock()
3938 if (class) in lockdep_reset_lock()
3939 zap_class(class); in lockdep_reset_lock()
3950 list_for_each_entry_safe(class, next, head, hash_entry) { in lockdep_reset_lock()
3954 match |= class == lock->class_cache[j]; in lockdep_reset_lock()