* [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT
[not found] <4BFA3728.3000701@cn.fujitsu.com>
@ 2010-05-24 8:24 ` Li Zefan
2010-05-25 14:57 ` tytso
0 siblings, 1 reply; 3+ messages in thread
From: Li Zefan @ 2010-05-24 8:24 UTC (permalink / raw)
To: Steven Rostedt
Cc: Frederic Weisbecker, Ingo Molnar, LKML, Theodore Ts'o,
linux-ext4
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>
---
include/trace/events/ext4.h | 61 ++++++++++++-------------------------------
1 files changed, 17 insertions(+), 44 deletions(-)
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 2aa6aa3..9425714 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -353,7 +353,7 @@ TRACE_EVENT(ext4_discard_blocks,
jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count)
);
-TRACE_EVENT(ext4_mb_new_inode_pa,
+DECLARE_EVENT_CLASS(ext4__mb_new_pa,
TP_PROTO(struct ext4_allocation_context *ac,
struct ext4_prealloc_space *pa),
@@ -381,32 +381,20 @@ TRACE_EVENT(ext4_mb_new_inode_pa,
__entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
);
-TRACE_EVENT(ext4_mb_new_group_pa,
+DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
+
TP_PROTO(struct ext4_allocation_context *ac,
struct ext4_prealloc_space *pa),
- TP_ARGS(ac, pa),
-
- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( ino_t, ino )
- __field( __u64, pa_pstart )
- __field( __u32, pa_len )
- __field( __u64, pa_lstart )
+ TP_ARGS(ac, pa)
+);
- ),
+DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
- TP_fast_assign(
- __entry->dev = ac->ac_sb->s_dev;
- __entry->ino = ac->ac_inode->i_ino;
- __entry->pa_pstart = pa->pa_pstart;
- __entry->pa_len = pa->pa_len;
- __entry->pa_lstart = pa->pa_lstart;
- ),
+ TP_PROTO(struct ext4_allocation_context *ac,
+ struct ext4_prealloc_space *pa),
- TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
- jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
- __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
+ TP_ARGS(ac, pa)
);
TRACE_EVENT(ext4_mb_release_inode_pa,
@@ -790,7 +778,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
__entry->result_len, __entry->result_logical)
);
-TRACE_EVENT(ext4_mballoc_discard,
+DECLARE_EVENT_CLASS(ext4__mballoc,
TP_PROTO(struct ext4_allocation_context *ac),
TP_ARGS(ac),
@@ -819,33 +807,18 @@ TRACE_EVENT(ext4_mballoc_discard,
__entry->result_len, __entry->result_logical)
);
-TRACE_EVENT(ext4_mballoc_free,
+DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
+
TP_PROTO(struct ext4_allocation_context *ac),
- TP_ARGS(ac),
+ TP_ARGS(ac)
+);
- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( ino_t, ino )
- __field( __u32, result_logical )
- __field( int, result_start )
- __field( __u32, result_group )
- __field( int, result_len )
- ),
+DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
- TP_fast_assign(
- __entry->dev = ac->ac_inode->i_sb->s_dev;
- __entry->ino = ac->ac_inode->i_ino;
- __entry->result_logical = ac->ac_b_ex.fe_logical;
- __entry->result_start = ac->ac_b_ex.fe_start;
- __entry->result_group = ac->ac_b_ex.fe_group;
- __entry->result_len = ac->ac_b_ex.fe_len;
- ),
+ TP_PROTO(struct ext4_allocation_context *ac),
- TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
- jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
- __entry->result_group, __entry->result_start,
- __entry->result_len, __entry->result_logical)
+ TP_ARGS(ac)
);
TRACE_EVENT(ext4_forget,
--
1.6.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT
2010-05-24 8:24 ` [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT Li Zefan
@ 2010-05-25 14:57 ` tytso
2010-05-25 15:02 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: tytso @ 2010-05-25 14:57 UTC (permalink / raw)
To: Li Zefan; +Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar, LKML,
linux-ext4
On Mon, May 24, 2010 at 04:24:04PM +0800, Li Zefan wrote:
> 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>
Thanks, added to the ext4 tree.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT
2010-05-25 14:57 ` tytso
@ 2010-05-25 15:02 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2010-05-25 15:02 UTC (permalink / raw)
To: tytso; +Cc: Li Zefan, Frederic Weisbecker, Ingo Molnar, LKML, linux-ext4
On Tue, 2010-05-25 at 10:57 -0400, tytso@mit.edu wrote:
> On Mon, May 24, 2010 at 04:24:04PM +0800, Li Zefan wrote:
> > 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>
>
> Thanks, added to the ext4 tree.
You could add...
Acked-by: Steven Rostedt <rostedt@goodmis.org>
if you want.
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-25 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4BFA3728.3000701@cn.fujitsu.com>
2010-05-24 8:24 ` [PATCH 5/8] tracing: Convert more ext4 events to DEFINE_EVENT Li Zefan
2010-05-25 14:57 ` tytso
2010-05-25 15:02 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).