All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] tracing: fix missed type name
@ 2009-07-08  7:11 Lai Jiangshan
  0 siblings, 0 replies; only message in thread
From: Lai Jiangshan @ 2009-07-08  7:11 UTC (permalink / raw)
  To: Ingo Molnar, Steven Rostedt, Frederic Weisbecker, LKML


events/SYSTEM/TP/format does not contain enough
information for __dynamic_array or __string. It misses
the type name.

__data_loc ITEM  ==> __data_loc TYPE[] ITEM

Then "__data_loc" is a storage modifier like "register" or "static".

Two additional fixes, it's also important for user.

__data_loc [TYPE] ==> __data_loc TYPE[]

TYPE ITEM[LEN] ==> TYPE[LEN] ITEM

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 1867553..8df5b20 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -111,7 +111,7 @@
 
 #undef __array
 #define __array(type, item, len)						\
-	ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t"	\
+	ret = trace_seq_printf(s, "\tfield:" #type "[" #len "] " #item ";\t"	\
 			       "offset:%u;\tsize:%u;\n",		\
 			       (unsigned int)offsetof(typeof(field), item), \
 			       (unsigned int)sizeof(field.item));	\
@@ -120,7 +120,7 @@
 
 #undef __dynamic_array
 #define __dynamic_array(type, item, len)				       \
-	ret = trace_seq_printf(s, "\tfield:__data_loc " #item ";\t"	       \
+	ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\
 			       "offset:%u;\tsize:%u;\n",		       \
 			       (unsigned int)offsetof(typeof(field),	       \
 					__data_loc_##item),		       \
@@ -279,7 +279,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags)	\
 
 #undef __dynamic_array
 #define __dynamic_array(type, item, len)				       \
-	ret = trace_define_field(event_call, "__data_loc" "[" #type "]", #item,\
+	ret = trace_define_field(event_call, "__data_loc " #type "[]", #item,  \
 				offsetof(typeof(field), __data_loc_##item),    \
 				 sizeof(field.__data_loc_##item), 0);
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-08  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08  7:11 [Patch] tracing: fix missed type name Lai Jiangshan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.