Add a new counter nr_zapped_lock_chains to track the number lock chains that have been removed.
Showing the changes to kernel/locking (3 of 3 files). Show all
Unified · Split
| @@ -2626,6 +2626,7 @@ out_bug: · 2625 unmodified lines | ||
| 2626 | 2626 | struct lock_chain lock_chains[MAX_LOCKDEP_CHAINS]; |
| 2627 | 2627 | static DECLARE_BITMAP(lock_chains_in_use, MAX_LOCKDEP_CHAINS); |
| 2628 | 2628 | static u16 chain_hlocks[MAX_LOCKDEP_CHAIN_HLOCKS]; |
| 2629 | +unsigned long nr_zapped_lock_chains; | |
| 2629 | 2630 | unsigned int nr_chain_hlocks; |
| 2630 | 2631 | |
| 2631 | 2632 | struct lock_class *lock_chain_get_class(struct lock_chain *chain, int i) |
| @@ -4797,6 +4798,7 @@ free_lock_chain: · 2165 unmodified lines | ||
| 4797 | 4798 | */ |
| 4798 | 4799 | hlist_del_rcu(&chain->entry); |
| 4799 | 4800 | __set_bit(chain - lock_chains, pf->lock_chains_being_freed); |
| 4801 | + nr_zapped_lock_chains++; | |
| 4800 | 4802 | #endif |
| 4801 | 4803 | } |
| 4802 | 4804 | |
| @@ -131,6 +131,7 @@ struct lock_class *lock_chain_get_class(struct lock_chain *chain, int i); · 130 unmodified lines | ||
| 131 | 131 | |
| 132 | 132 | extern unsigned long nr_lock_classes; |
| 133 | 133 | extern unsigned long nr_zapped_classes; |
| 134 | +extern unsigned long nr_zapped_lock_chains; | |
| 134 | 135 | extern unsigned long nr_list_entries; |
| 135 | 136 | long lockdep_next_lockchain(long i); |
| 136 | 137 | unsigned long lock_chain_count(void); |
| @@ -349,6 +349,10 @@ static int lockdep_stats_show(struct seq_file *m, void *v) · 348 unmodified lines | ||
| 349 | 349 | seq_puts(m, "\n"); |
| 350 | 350 | seq_printf(m, " zapped classes: %11lu\n", |
| 351 | 351 | nr_zapped_classes); |
| 352 | +#ifdef CONFIG_PROVE_LOCKING | |
| 353 | + seq_printf(m, " zapped lock chains: %11lu\n", | |
| 354 | + nr_zapped_lock_chains); | |
| 355 | +#endif | |
| 352 | 356 | return 0; |
| 353 | 357 | } |
| 354 | 358 | |