2010-04-26 20:02:46

by Steven Rostedt

[permalink] [raw]
Subject: [PATCH 03/10][RFC] tracing: Convert TRACE_EVENT() to use the DECLARE_TRACE_DATA()

From: Steven Rostedt <[email protected]>

Switch the TRACE_EVENT() macros to use DECLARE_TRACE_DATA(). This
patch is done to prove that the DATA macros work. If any regressions
were to surface, then this patch would help a git bisect to localize
the area.

Once again this patch increases the size of the kernel.

text data bss dec hex filename
5788186 1337252 9351592 16477030 fb6b66 vmlinux.orig
5792282 1333796 9351592 16477670 fb6de6 vmlinux.class
5793448 1333780 9351592 16478820 fb7264 vmlinux.tracepoint
5796926 1337748 9351592 16486266 fb8f7a vmlinux.data

Signed-off-by: Steven Rostedt <[email protected]>
---
include/linux/tracepoint.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 4649bdb..c04988a 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -355,14 +355,14 @@ static inline void tracepoint_synchronize_unregister(void)

#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
#define DEFINE_EVENT(template, name, proto, args) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+ DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+ DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))

#define TRACE_EVENT(name, proto, args, struct, assign, print) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+ DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))
#define TRACE_EVENT_FN(name, proto, args, struct, \
assign, print, reg, unreg) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+ DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))

#endif /* ifdef TRACE_EVENT (see note above) */
--
1.7.0


2010-04-28 20:39:44

by Mathieu Desnoyers

[permalink] [raw]
Subject: Re: [PATCH 03/10][RFC] tracing: Convert TRACE_EVENT() to use the DECLARE_TRACE_DATA()

* Steven Rostedt ([email protected]) wrote:
> From: Steven Rostedt <[email protected]>
>
> Switch the TRACE_EVENT() macros to use DECLARE_TRACE_DATA(). This
> patch is done to prove that the DATA macros work. If any regressions
> were to surface, then this patch would help a git bisect to localize
> the area.
>
> Once again this patch increases the size of the kernel.
>

As recommended in the earlier email:

It would make sense to just add the extra "callback_data" argument
directly to DECLARE_TRACE(), modify the user (TRACE_EVENT) accordingly.
And possibly create a TRACE_EVENT_NOARG() variant.

Thanks,

Mathieu

> text data bss dec hex filename
> 5788186 1337252 9351592 16477030 fb6b66 vmlinux.orig
> 5792282 1333796 9351592 16477670 fb6de6 vmlinux.class
> 5793448 1333780 9351592 16478820 fb7264 vmlinux.tracepoint
> 5796926 1337748 9351592 16486266 fb8f7a vmlinux.data
>
> Signed-off-by: Steven Rostedt <[email protected]>
> ---
> include/linux/tracepoint.h | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
> index 4649bdb..c04988a 100644
> --- a/include/linux/tracepoint.h
> +++ b/include/linux/tracepoint.h
> @@ -355,14 +355,14 @@ static inline void tracepoint_synchronize_unregister(void)
>
> #define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
> #define DEFINE_EVENT(template, name, proto, args) \
> - DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> + DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))
> #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
> - DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> + DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))
>
> #define TRACE_EVENT(name, proto, args, struct, assign, print) \
> - DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> + DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))
> #define TRACE_EVENT_FN(name, proto, args, struct, \
> assign, print, reg, unreg) \
> - DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> + DECLARE_TRACE_DATA(name, PARAMS(proto), PARAMS(args))
>
> #endif /* ifdef TRACE_EVENT (see note above) */
> --
> 1.7.0
>
>

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

2010-04-28 23:58:00

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH 03/10][RFC] tracing: Convert TRACE_EVENT() to use the DECLARE_TRACE_DATA()

On Wed, 2010-04-28 at 16:39 -0400, Mathieu Desnoyers wrote:
> * Steven Rostedt ([email protected]) wrote:
> > From: Steven Rostedt <[email protected]>
> >
> > Switch the TRACE_EVENT() macros to use DECLARE_TRACE_DATA(). This
> > patch is done to prove that the DATA macros work. If any regressions
> > were to surface, then this patch would help a git bisect to localize
> > the area.
> >
> > Once again this patch increases the size of the kernel.
> >
>
> As recommended in the earlier email:
>
> It would make sense to just add the extra "callback_data" argument
> directly to DECLARE_TRACE(), modify the user (TRACE_EVENT) accordingly.
> And possibly create a TRACE_EVENT_NOARG() variant.

Are you suggesting to make DECLARE_TRACE() be...

#define DECLARE_TRACE(name, proto, args, data)

?

-- Steve

2010-04-29 00:04:05

by Mathieu Desnoyers

[permalink] [raw]
Subject: Re: [PATCH 03/10][RFC] tracing: Convert TRACE_EVENT() to use the DECLARE_TRACE_DATA()

* Steven Rostedt ([email protected]) wrote:
> On Wed, 2010-04-28 at 16:39 -0400, Mathieu Desnoyers wrote:
> > * Steven Rostedt ([email protected]) wrote:
> > > From: Steven Rostedt <[email protected]>
> > >
> > > Switch the TRACE_EVENT() macros to use DECLARE_TRACE_DATA(). This
> > > patch is done to prove that the DATA macros work. If any regressions
> > > were to surface, then this patch would help a git bisect to localize
> > > the area.
> > >
> > > Once again this patch increases the size of the kernel.
> > >
> >
> > As recommended in the earlier email:
> >
> > It would make sense to just add the extra "callback_data" argument
> > directly to DECLARE_TRACE(), modify the user (TRACE_EVENT) accordingly.
> > And possibly create a TRACE_EVENT_NOARG() variant.
>
> Are you suggesting to make DECLARE_TRACE() be...
>
> #define DECLARE_TRACE(name, proto, args, data)
>
> ?

err.. forget about that. We only need to modify the callback to take the
extra argument into acount, not DECLARE_TRACE().

Thanks,

Mathieu

>
> -- Steve
>
>

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com