All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 04/10] tracing: __dynamic_array() also defines fields
@ 2009-12-09  7:15 Lai Jiangshan
  2009-12-11  0:20 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Lai Jiangshan @ 2009-12-09  7:15 UTC (permalink / raw)
  To: Ingo Molnar, Steven Rostedt, Frederic Weisbecker,
	Masami Hiramatsu, Jason Baron, LKML


dynamic array is also added to struct ftrace_event_call->fields.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 458e5bf..511bc36 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -174,7 +174,12 @@ ftrace_format_##name(struct ftrace_event_call *unused,			\
 		return ret;
 
 #undef __dynamic_array
-#define __dynamic_array(type, item)
+#define __dynamic_array(type, item)					\
+	ret = trace_define_field(event_call, #type, #item,		\
+				 offsetof(typeof(field), item),		\
+				 0, is_signed_type(type), FILTER_OTHER);\
+	if (ret)							\
+		return ret;
 
 #undef FTRACE_ENTRY
 #define FTRACE_ENTRY(name, struct_name, id, tstruct, print)		\



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

* Re: [PATCH 04/10] tracing: __dynamic_array() also defines fields
  2009-12-09  7:15 [PATCH 04/10] tracing: __dynamic_array() also defines fields Lai Jiangshan
@ 2009-12-11  0:20 ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2009-12-11  0:20 UTC (permalink / raw)
  To: Lai Jiangshan
  Cc: Ingo Molnar, Frederic Weisbecker, Masami Hiramatsu, Jason Baron, LKML

On Wed, 2009-12-09 at 15:15 +0800, Lai Jiangshan wrote:
> dynamic array is also added to struct ftrace_event_call->fields.

Could you add to the change log which events use it. I see bprint and
print. But this change log is still lacking. It should explain what
features this fixes.

But as for the patch itself:

Acked-by: Steven Rostedt <rostedt@goodmis.org>

Thanks,

-- Steve



> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
> index 458e5bf..511bc36 100644
> --- a/kernel/trace/trace_export.c
> +++ b/kernel/trace/trace_export.c
> @@ -174,7 +174,12 @@ ftrace_format_##name(struct ftrace_event_call *unused,			\
>  		return ret;
>  
>  #undef __dynamic_array
> -#define __dynamic_array(type, item)
> +#define __dynamic_array(type, item)					\
> +	ret = trace_define_field(event_call, #type, #item,		\
> +				 offsetof(typeof(field), item),		\
> +				 0, is_signed_type(type), FILTER_OTHER);\
> +	if (ret)							\
> +		return ret;
>  
>  #undef FTRACE_ENTRY
>  #define FTRACE_ENTRY(name, struct_name, id, tstruct, print)		\
> 
> 



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

* [PATCH 04/10] tracing: __dynamic_array() also defines fields
@ 2009-12-15  7:39 Lai Jiangshan
  0 siblings, 0 replies; 3+ messages in thread
From: Lai Jiangshan @ 2009-12-15  7:39 UTC (permalink / raw)
  To: Ingo Molnar, Steven Rostedt, Frederic Weisbecker,
	Masami Hiramatsu, Jason Baron, LKML


dynamic array is also added to struct ftrace_event_call->fields.

FTRACE_ENTRY(bprint) and FTRACE_ENTRY(print) use this __dynamic_array().

Preparing patch for new way of printing format files which uses
defined fields to print formats. So it requires all fields
are added to struct ftrace_event_call->fields.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 458e5bf..511bc36 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -174,7 +174,12 @@ ftrace_format_##name(struct ftrace_event_call *unused,			\
 		return ret;
 
 #undef __dynamic_array
-#define __dynamic_array(type, item)
+#define __dynamic_array(type, item)					\
+	ret = trace_define_field(event_call, #type, #item,		\
+				 offsetof(typeof(field), item),		\
+				 0, is_signed_type(type), FILTER_OTHER);\
+	if (ret)							\
+		return ret;
 
 #undef FTRACE_ENTRY
 #define FTRACE_ENTRY(name, struct_name, id, tstruct, print)		\





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

end of thread, other threads:[~2009-12-15  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-09  7:15 [PATCH 04/10] tracing: __dynamic_array() also defines fields Lai Jiangshan
2009-12-11  0:20 ` Steven Rostedt
2009-12-15  7:39 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.