public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] compile time initialization for event flags value
@ 2011-01-26  8:49 Lai Jiangshan
  2011-01-26 17:19 ` Frederic Weisbecker
  2011-02-17 15:01 ` [tip:perf/core] tracing: Compile " tip-bot for Lai Jiangshan
  0 siblings, 2 replies; 3+ messages in thread
From: Lai Jiangshan @ 2011-01-26  8:49 UTC (permalink / raw)
  To: Frederic Weisbecker, Steven Rostedt, Ingo Molnar, LKML

compile time initialization is better than runtime initialization.

impact: remove many early_initcall()s and many trace_init_flags_##name()s.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 18cd068..ff074c8 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -135,8 +135,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
 		.class			= &event_class_syscall_enter,	\
 		.event.funcs            = &enter_syscall_print_funcs,	\
 		.data			= (void *)&__syscall_meta_##sname,\
-	};								\
-	__TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
+		.flags			= TRACE_EVENT_FL_CAP_ANY,	\
+	};
 
 #define SYSCALL_TRACE_EXIT_EVENT(sname)					\
 	static struct syscall_metadata					\
@@ -149,8 +149,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
 		.class			= &event_class_syscall_exit,	\
 		.event.funcs		= &exit_syscall_print_funcs,	\
 		.data			= (void *)&__syscall_meta_##sname,\
-	};								\
-	__TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
+		.flags			= TRACE_EVENT_FL_CAP_ANY,	\
+	};
 
 #define SYSCALL_METADATA(sname, nb)				\
 	SYSCALL_TRACE_ENTER_EVENT(sname);			\

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] compile time initialization for event flags value
  2011-01-26  8:49 [PATCH] compile time initialization for event flags value Lai Jiangshan
@ 2011-01-26 17:19 ` Frederic Weisbecker
  2011-02-17 15:01 ` [tip:perf/core] tracing: Compile " tip-bot for Lai Jiangshan
  1 sibling, 0 replies; 3+ messages in thread
From: Frederic Weisbecker @ 2011-01-26 17:19 UTC (permalink / raw)
  To: Lai Jiangshan, Steven Rostedt; +Cc: Ingo Molnar, LKML

On Wed, Jan 26, 2011 at 04:49:00PM +0800, Lai Jiangshan wrote:
> compile time initialization is better than runtime initialization.
> 
> impact: remove many early_initcall()s and many trace_init_flags_##name()s.
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index 18cd068..ff074c8 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -135,8 +135,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
>  		.class			= &event_class_syscall_enter,	\
>  		.event.funcs            = &enter_syscall_print_funcs,	\
>  		.data			= (void *)&__syscall_meta_##sname,\
> -	};								\
> -	__TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
> +		.flags			= TRACE_EVENT_FL_CAP_ANY,	\
> +	};
>  
>  #define SYSCALL_TRACE_EXIT_EVENT(sname)					\
>  	static struct syscall_metadata					\
> @@ -149,8 +149,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
>  		.class			= &event_class_syscall_exit,	\
>  		.event.funcs		= &exit_syscall_print_funcs,	\
>  		.data			= (void *)&__syscall_meta_##sname,\
> -	};								\
> -	__TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
> +		.flags			= TRACE_EVENT_FL_CAP_ANY,	\
> +	};
>  
>  #define SYSCALL_METADATA(sname, nb)				\
>  	SYSCALL_TRACE_ENTER_EVENT(sname);			\

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] tracing: Compile time initialization for event flags value
  2011-01-26  8:49 [PATCH] compile time initialization for event flags value Lai Jiangshan
  2011-01-26 17:19 ` Frederic Weisbecker
@ 2011-02-17 15:01 ` tip-bot for Lai Jiangshan
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Lai Jiangshan @ 2011-02-17 15:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, fweisbec, rostedt, tglx, laijs

Commit-ID:  f4d5c029bd6731baac0937324cef0f746e7d5ea7
Gitweb:     http://git.kernel.org/tip/f4d5c029bd6731baac0937324cef0f746e7d5ea7
Author:     Lai Jiangshan <laijs@cn.fujitsu.com>
AuthorDate: Wed, 26 Jan 2011 16:49:00 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Tue, 8 Feb 2011 17:14:54 -0500

tracing: Compile time initialization for event flags value

Compile time initialization is better than runtime initialization.

Remove many early_initcall()s and many trace_init_flags_##name()s.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4D3FDFFC.6030304@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/syscalls.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 8e8968e..a17fcea 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -132,11 +132,11 @@ extern struct trace_event_functions exit_syscall_print_funcs;
 		.class			= &event_class_syscall_enter,	\
 		.event.funcs            = &enter_syscall_print_funcs,	\
 		.data			= (void *)&__syscall_meta_##sname,\
+		.flags			= TRACE_EVENT_FL_CAP_ANY,	\
 	};								\
 	static struct ftrace_event_call __used				\
 	  __attribute__((section("_ftrace_events")))			\
-	 *__event_enter_##sname = &event_enter_##sname;			\
-	__TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
+	 *__event_enter_##sname = &event_enter_##sname;
 
 #define SYSCALL_TRACE_EXIT_EVENT(sname)					\
 	static struct syscall_metadata __syscall_meta_##sname;		\
@@ -146,11 +146,11 @@ extern struct trace_event_functions exit_syscall_print_funcs;
 		.class			= &event_class_syscall_exit,	\
 		.event.funcs		= &exit_syscall_print_funcs,	\
 		.data			= (void *)&__syscall_meta_##sname,\
+		.flags			= TRACE_EVENT_FL_CAP_ANY,	\
 	};								\
 	static struct ftrace_event_call __used				\
 	  __attribute__((section("_ftrace_events")))			\
-	*__event_exit_##sname = &event_exit_##sname;			\
-	__TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
+	*__event_exit_##sname = &event_exit_##sname;
 
 #define SYSCALL_METADATA(sname, nb)				\
 	SYSCALL_TRACE_ENTER_EVENT(sname);			\

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-17 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26  8:49 [PATCH] compile time initialization for event flags value Lai Jiangshan
2011-01-26 17:19 ` Frederic Weisbecker
2011-02-17 15:01 ` [tip:perf/core] tracing: Compile " tip-bot for Lai Jiangshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox