aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/ext4.h
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2010-05-17 04:00:00 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-05-17 04:00:00 -0400
commitf084db932e6fe877bf8362bc256fc850de196deb (patch)
treeb09c667b5ba96751c1d7638f633cdd5e292221a7 /include/trace/events/ext4.h
parentf307333e14f6b18045eb4198fe646d9b6028f3ed (diff)
tracing: Convert more ext4 events to DEFINE_EVENT
Use DECLARE_EVENT_CLASS, and save ~2.7K: text data bss dec hex filename 274441 7200 260 281901 44d2d fs/ext4/ext4.o.orig 271881 7040 256 279177 44289 fs/ext4/ext4.o 4 events are converted: ext4__mb_new_pa: ext4_mb_new_inode_pa, ext4_mb_new_group_pa ext4__mballoc: ext4_mballoc_discard, ext4_mballoc_free No change in functionality. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r--include/trace/events/ext4.h61
1 files changed, 17 insertions, 44 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 99fbf1d0a6b9..5d60ad4ebf78 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,
@@ -790,7 +778,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
790 __entry->result_len, __entry->result_logical) 778 __entry->result_len, __entry->result_logical)
791); 779);
792 780
793TRACE_EVENT(ext4_mballoc_discard, 781DECLARE_EVENT_CLASS(ext4__mballoc,
794 TP_PROTO(struct ext4_allocation_context *ac), 782 TP_PROTO(struct ext4_allocation_context *ac),
795 783
796 TP_ARGS(ac), 784 TP_ARGS(ac),
@@ -819,33 +807,18 @@ TRACE_EVENT(ext4_mballoc_discard,
819 __entry->result_len, __entry->result_logical) 807 __entry->result_len, __entry->result_logical)
820); 808);
821 809
822TRACE_EVENT(ext4_mballoc_free, 810DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
811
823 TP_PROTO(struct ext4_allocation_context *ac), 812 TP_PROTO(struct ext4_allocation_context *ac),
824 813
825 TP_ARGS(ac), 814 TP_ARGS(ac)
815);
826 816
827 TP_STRUCT__entry( 817DEFINE_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 818
836 TP_fast_assign( 819 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 820
845 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", 821 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); 822);
850 823
851TRACE_EVENT(ext4_forget, 824TRACE_EVENT(ext4_forget,