diff options
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r-- | lib/debugobjects.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 2f5349c6e81a..f6d57a11c927 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -50,6 +50,7 @@ static int obj_pool_max_used; | |||
50 | static struct kmem_cache *obj_cache; | 50 | static struct kmem_cache *obj_cache; |
51 | 51 | ||
52 | static int debug_objects_maxchain __read_mostly; | 52 | static int debug_objects_maxchain __read_mostly; |
53 | static int debug_objects_maxchecked __read_mostly; | ||
53 | static int debug_objects_fixups __read_mostly; | 54 | static int debug_objects_fixups __read_mostly; |
54 | static int debug_objects_warnings __read_mostly; | 55 | static int debug_objects_warnings __read_mostly; |
55 | static int debug_objects_enabled __read_mostly | 56 | static int debug_objects_enabled __read_mostly |
@@ -720,7 +721,7 @@ static void __debug_check_no_obj_freed(const void *address, unsigned long size) | |||
720 | enum debug_obj_state state; | 721 | enum debug_obj_state state; |
721 | struct debug_bucket *db; | 722 | struct debug_bucket *db; |
722 | struct debug_obj *obj; | 723 | struct debug_obj *obj; |
723 | int cnt; | 724 | int cnt, objs_checked = 0; |
724 | 725 | ||
725 | saddr = (unsigned long) address; | 726 | saddr = (unsigned long) address; |
726 | eaddr = saddr + size; | 727 | eaddr = saddr + size; |
@@ -765,7 +766,12 @@ repeat: | |||
765 | 766 | ||
766 | if (cnt > debug_objects_maxchain) | 767 | if (cnt > debug_objects_maxchain) |
767 | debug_objects_maxchain = cnt; | 768 | debug_objects_maxchain = cnt; |
769 | |||
770 | objs_checked += cnt; | ||
768 | } | 771 | } |
772 | |||
773 | if (objs_checked > debug_objects_maxchecked) | ||
774 | debug_objects_maxchecked = objs_checked; | ||
769 | } | 775 | } |
770 | 776 | ||
771 | void debug_check_no_obj_freed(const void *address, unsigned long size) | 777 | void debug_check_no_obj_freed(const void *address, unsigned long size) |
@@ -780,6 +786,7 @@ void debug_check_no_obj_freed(const void *address, unsigned long size) | |||
780 | static int debug_stats_show(struct seq_file *m, void *v) | 786 | static int debug_stats_show(struct seq_file *m, void *v) |
781 | { | 787 | { |
782 | seq_printf(m, "max_chain :%d\n", debug_objects_maxchain); | 788 | seq_printf(m, "max_chain :%d\n", debug_objects_maxchain); |
789 | seq_printf(m, "max_checked :%d\n", debug_objects_maxchecked); | ||
783 | seq_printf(m, "warnings :%d\n", debug_objects_warnings); | 790 | seq_printf(m, "warnings :%d\n", debug_objects_warnings); |
784 | seq_printf(m, "fixups :%d\n", debug_objects_fixups); | 791 | seq_printf(m, "fixups :%d\n", debug_objects_fixups); |
785 | seq_printf(m, "pool_free :%d\n", obj_pool_free); | 792 | seq_printf(m, "pool_free :%d\n", obj_pool_free); |