aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/mballoc.c2
-rw-r--r--include/trace/events/ext4.h33
2 files changed, 35 insertions, 0 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 0bdc0188e5e2..a93f554b6803 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -890,6 +890,7 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
890 BUG_ON(incore == NULL); 890 BUG_ON(incore == NULL);
891 mb_debug(1, "put buddy for group %u in page %lu/%x\n", 891 mb_debug(1, "put buddy for group %u in page %lu/%x\n",
892 group, page->index, i * blocksize); 892 group, page->index, i * blocksize);
893 trace_ext4_mb_buddy_bitmap_load(sb, group);
893 grinfo = ext4_get_group_info(sb, group); 894 grinfo = ext4_get_group_info(sb, group);
894 grinfo->bb_fragments = 0; 895 grinfo->bb_fragments = 0;
895 memset(grinfo->bb_counters, 0, 896 memset(grinfo->bb_counters, 0,
@@ -907,6 +908,7 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
907 BUG_ON(incore != NULL); 908 BUG_ON(incore != NULL);
908 mb_debug(1, "put bitmap for group %u in page %lu/%x\n", 909 mb_debug(1, "put bitmap for group %u in page %lu/%x\n",
909 group, page->index, i * blocksize); 910 group, page->index, i * blocksize);
911 trace_ext4_mb_bitmap_load(sb, group);
910 912
911 /* see comments in ext4_mb_put_pa() */ 913 /* see comments in ext4_mb_put_pa() */
912 ext4_lock_group(sb, group); 914 ext4_lock_group(sb, group);
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 2aa6aa3e8f61..99fbf1d0a6b9 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -974,6 +974,39 @@ TRACE_EVENT(ext4_da_release_space,
974 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 974 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
975); 975);
976 976
977DECLARE_EVENT_CLASS(ext4__bitmap_load,
978 TP_PROTO(struct super_block *sb, unsigned long group),
979
980 TP_ARGS(sb, group),
981
982 TP_STRUCT__entry(
983 __field( dev_t, dev )
984 __field( __u32, group )
985
986 ),
987
988 TP_fast_assign(
989 __entry->dev = sb->s_dev;
990 __entry->group = group;
991 ),
992
993 TP_printk("dev %s group %u",
994 jbd2_dev_to_name(__entry->dev), __entry->group)
995);
996
997DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
998
999 TP_PROTO(struct super_block *sb, unsigned long group),
1000
1001 TP_ARGS(sb, group)
1002);
1003
1004DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
1005
1006 TP_PROTO(struct super_block *sb, unsigned long group),
1007
1008 TP_ARGS(sb, group)
1009);
977 1010
978#endif /* _TRACE_EXT4_H */ 1011#endif /* _TRACE_EXT4_H */
979 1012