public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tracing/events: put TP_fast_assign into braces
@ 2009-06-01  7:35 Li Zefan
  2009-06-01  7:35 ` [PATCH 2/2] tracing/events: introduce __dynamic_array() Li Zefan
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Li Zefan @ 2009-06-01  7:35 UTC (permalink / raw)
  To: Steven Rostedt, Frederic Weisbecker; +Cc: Ingo Molnar, Christoph Hellwig, LKML

Currently TP_fast_assin has a limitation that we can't define local
variables in it.

Here's one use case when we introduce __dynamic_array():

TP_fast_assign(
	type *p = __get_dynamic_array(item);

	foo(p);
	bar(p);
),

[ Impact: allow defining local variables in TP_fast_assign ]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 include/trace/ftrace.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 9276ec4..ee92682 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -471,7 +471,7 @@ static void ftrace_raw_event_##call(proto)				\
 		return;							\
 	entry	= ring_buffer_event_data(event);			\
 									\
-	assign;								\
+	{ assign; }							\
 									\
 	if (!filter_current_check_discard(event_call, entry, event))	\
 		trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
-- 
1.5.4.rc3



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

end of thread, other threads:[~2009-06-04 12:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01  7:35 [PATCH 1/2] tracing/events: put TP_fast_assign into braces Li Zefan
2009-06-01  7:35 ` [PATCH 2/2] tracing/events: introduce __dynamic_array() Li Zefan
2009-06-01  8:30   ` Christoph Hellwig
2009-06-01 13:12   ` Steven Rostedt
2009-06-01 16:36   ` Frederic Weisbecker
2009-06-04 12:04   ` [tip:tracing/core] " tip-bot for Li Zefan
2009-06-01  8:29 ` [PATCH 1/2] tracing/events: put TP_fast_assign into braces Christoph Hellwig
2009-06-01 13:11 ` Steven Rostedt
2009-06-01 13:16   ` Frederic Weisbecker
2009-06-04 12:04 ` [tip:tracing/core] " tip-bot for Li Zefan

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