mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>
Subject: [PATCH 03/10] tracing: Have __dynamic_array() define a field
Date: Tue, 29 Dec 2009 11:22:34 -0500	[thread overview]
Message-ID: <20091229162637.435505464@goodmis.org> (raw)
In-Reply-To: <20091229162231.441352392@goodmis.org>

[-- Attachment #1: 0003-tracing-Have-__dynamic_array-define-a-field.patch --]
[-- Type: text/plain, Size: 1233 bytes --]

From: Lai Jiangshan <laijs@cn.fujitsu.com>

This is part of a patch set that removes the show_format method
in the ftrace event macros.

This patch set requires that all fields are added to the
ftrace_event_call->fields. This patch changes __dynamic_array()
to call trace_define_field() to include fields that use __dynamic_array().

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B273D36.8090100@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_export.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

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)		\
-- 
1.6.5



  parent reply	other threads:[~2009-12-29 16:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29 16:22 [PATCH 0/10][GIT PULL][v2.6.33] tracing: consolidate print fmt Steven Rostedt
2009-12-29 16:22 ` [PATCH 01/10] tracing/kprobe: Show sign of fields in trace_kprobe format files Steven Rostedt
2009-12-29 16:22 ` [PATCH 02/10] tracing/syscalls: Fix typo in SYSCALL_DEFINE0 Steven Rostedt
2009-12-29 16:22 ` Steven Rostedt [this message]
2009-12-29 16:22 ` [PATCH 04/10] tracing: Fix sign fields in ftrace_define_fields_##call() Steven Rostedt
2009-12-29 16:22 ` [PATCH 05/10] tracing: Add print_fmt field Steven Rostedt
2009-12-29 16:22 ` [PATCH 06/10] tracing/syscalls: Init print_fmt for syscall events Steven Rostedt
2009-12-29 16:22 ` [PATCH 07/10] tracing/kprobes: Init print_fmt for kprobe events Steven Rostedt
2009-12-29 16:22 ` [PATCH 08/10] tracing: Have syscall tracing call its own init function Steven Rostedt
2009-12-29 16:22 ` [PATCH 09/10] tracing: Use defined fields and print_fmt to print formats Steven Rostedt
2009-12-29 16:22 ` [PATCH 10/10] tracing: Remove show_format and related macros from TRACE_EVENT Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091229162637.435505464@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®