aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/ext4.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r--include/trace/events/ext4.h100
1 files changed, 54 insertions, 46 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 2aa6aa3e8f61..f5b1ba90e952 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -353,7 +353,7 @@ TRACE_EVENT(ext4_discard_blocks,
353 jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) 353 jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count)
354); 354);
355 355
356TRACE_EVENT(ext4_mb_new_inode_pa, 356DECLARE_EVENT_CLASS(ext4__mb_new_pa,
357 TP_PROTO(struct ext4_allocation_context *ac, 357 TP_PROTO(struct ext4_allocation_context *ac,
358 struct ext4_prealloc_space *pa), 358 struct ext4_prealloc_space *pa),
359 359
@@ -381,32 +381,20 @@ TRACE_EVENT(ext4_mb_new_inode_pa,
381 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) 381 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
382); 382);
383 383
384TRACE_EVENT(ext4_mb_new_group_pa, 384DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
385
385 TP_PROTO(struct ext4_allocation_context *ac, 386 TP_PROTO(struct ext4_allocation_context *ac,
386 struct ext4_prealloc_space *pa), 387 struct ext4_prealloc_space *pa),
387 388
388 TP_ARGS(ac, pa), 389 TP_ARGS(ac, pa)
389 390);
390 TP_STRUCT__entry(
391 __field( dev_t, dev )
392 __field( ino_t, ino )
393 __field( __u64, pa_pstart )
394 __field( __u32, pa_len )
395 __field( __u64, pa_lstart )
396 391
397 ), 392DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
398 393
399 TP_fast_assign( 394 TP_PROTO(struct ext4_allocation_context *ac,
400 __entry->dev = ac->ac_sb->s_dev; 395 struct ext4_prealloc_space *pa),
401 __entry->ino = ac->ac_inode->i_ino;
402 __entry->pa_pstart = pa->pa_pstart;
403 __entry->pa_len = pa->pa_len;
404 __entry->pa_lstart = pa->pa_lstart;
405 ),
406 396
407 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 397 TP_ARGS(ac, pa)
408 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
409 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
410); 398);
411 399
412TRACE_EVENT(ext4_mb_release_inode_pa, 400TRACE_EVENT(ext4_mb_release_inode_pa,
@@ -618,9 +606,9 @@ TRACE_EVENT(ext4_free_blocks,
618); 606);
619 607
620TRACE_EVENT(ext4_sync_file, 608TRACE_EVENT(ext4_sync_file,
621 TP_PROTO(struct file *file, struct dentry *dentry, int datasync), 609 TP_PROTO(struct file *file, int datasync),
622 610
623 TP_ARGS(file, dentry, datasync), 611 TP_ARGS(file, datasync),
624 612
625 TP_STRUCT__entry( 613 TP_STRUCT__entry(
626 __field( dev_t, dev ) 614 __field( dev_t, dev )
@@ -630,6 +618,8 @@ TRACE_EVENT(ext4_sync_file,
630 ), 618 ),
631 619
632 TP_fast_assign( 620 TP_fast_assign(
621 struct dentry *dentry = file->f_path.dentry;
622
633 __entry->dev = dentry->d_inode->i_sb->s_dev; 623 __entry->dev = dentry->d_inode->i_sb->s_dev;
634 __entry->ino = dentry->d_inode->i_ino; 624 __entry->ino = dentry->d_inode->i_ino;
635 __entry->datasync = datasync; 625 __entry->datasync = datasync;
@@ -790,7 +780,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
790 __entry->result_len, __entry->result_logical) 780 __entry->result_len, __entry->result_logical)
791); 781);
792 782
793TRACE_EVENT(ext4_mballoc_discard, 783DECLARE_EVENT_CLASS(ext4__mballoc,
794 TP_PROTO(struct ext4_allocation_context *ac), 784 TP_PROTO(struct ext4_allocation_context *ac),
795 785
796 TP_ARGS(ac), 786 TP_ARGS(ac),
@@ -819,33 +809,18 @@ TRACE_EVENT(ext4_mballoc_discard,
819 __entry->result_len, __entry->result_logical) 809 __entry->result_len, __entry->result_logical)
820); 810);
821 811
822TRACE_EVENT(ext4_mballoc_free, 812DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
813
823 TP_PROTO(struct ext4_allocation_context *ac), 814 TP_PROTO(struct ext4_allocation_context *ac),
824 815
825 TP_ARGS(ac), 816 TP_ARGS(ac)
817);
826 818
827 TP_STRUCT__entry( 819DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
828 __field( dev_t, dev )
829 __field( ino_t, ino )
830 __field( __u32, result_logical )
831 __field( int, result_start )
832 __field( __u32, result_group )
833 __field( int, result_len )
834 ),
835 820
836 TP_fast_assign( 821 TP_PROTO(struct ext4_allocation_context *ac),
837 __entry->dev = ac->ac_inode->i_sb->s_dev;
838 __entry->ino = ac->ac_inode->i_ino;
839 __entry->result_logical = ac->ac_b_ex.fe_logical;
840 __entry->result_start = ac->ac_b_ex.fe_start;
841 __entry->result_group = ac->ac_b_ex.fe_group;
842 __entry->result_len = ac->ac_b_ex.fe_len;
843 ),
844 822
845 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", 823 TP_ARGS(ac)
846 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
847 __entry->result_group, __entry->result_start,
848 __entry->result_len, __entry->result_logical)
849); 824);
850 825
851TRACE_EVENT(ext4_forget, 826TRACE_EVENT(ext4_forget,
@@ -974,6 +949,39 @@ TRACE_EVENT(ext4_da_release_space,
974 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 949 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
975); 950);
976 951
952DECLARE_EVENT_CLASS(ext4__bitmap_load,
953 TP_PROTO(struct super_block *sb, unsigned long group),
954
955 TP_ARGS(sb, group),
956
957 TP_STRUCT__entry(
958 __field( dev_t, dev )
959 __field( __u32, group )
960
961 ),
962
963 TP_fast_assign(
964 __entry->dev = sb->s_dev;
965 __entry->group = group;
966 ),
967
968 TP_printk("dev %s group %u",
969 jbd2_dev_to_name(__entry->dev), __entry->group)
970);
971
972DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
973
974 TP_PROTO(struct super_block *sb, unsigned long group),
975
976 TP_ARGS(sb, group)
977);
978
979DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
980
981 TP_PROTO(struct super_block *sb, unsigned long group),
982
983 TP_ARGS(sb, group)
984);
977 985
978#endif /* _TRACE_EXT4_H */ 986#endif /* _TRACE_EXT4_H */
979 987