From: tip-bot for Li Zefan <lizf@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
lizf@cn.fujitsu.com, fweisbec@gmail.com, rostedt@goodmis.org,
tglx@linutronix.de, jbaron@redhat.com, mingo@elte.hu
Subject: [tip:tracing/core] tracing/events: Add ftrace_event_call param to define_fields()
Date: Wed, 19 Aug 2009 13:31:34 GMT [thread overview]
Message-ID: <tip-14be96c9716cb8c46dca94bd890defd7856e0734@git.kernel.org> (raw)
In-Reply-To: <4A8BAF90.6060801@cn.fujitsu.com>
Commit-ID: 14be96c9716cb8c46dca94bd890defd7856e0734
Gitweb: http://git.kernel.org/tip/14be96c9716cb8c46dca94bd890defd7856e0734
Author: Li Zefan <lizf@cn.fujitsu.com>
AuthorDate: Wed, 19 Aug 2009 15:53:52 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 19 Aug 2009 15:02:23 +0200
tracing/events: Add ftrace_event_call param to define_fields()
This parameter is needed by syscall events to add define_fields()
handler.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A8BAF90.6060801@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/ftrace_event.h | 2 +-
include/trace/ftrace.h | 3 +--
kernel/trace/trace_events.c | 2 +-
kernel/trace/trace_export.c | 5 ++---
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 189806b..35b3a4a 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -118,7 +118,7 @@ struct ftrace_event_call {
int (*raw_init)(void);
int (*show_format)(struct ftrace_event_call *call,
struct trace_seq *s);
- int (*define_fields)(void);
+ int (*define_fields)(struct ftrace_event_call *);
struct list_head fields;
int filter_active;
struct event_filter *filter;
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index b250b06..4e81c9b 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -294,10 +294,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
#undef TRACE_EVENT
#define TRACE_EVENT(call, proto, args, tstruct, func, print) \
int \
-ftrace_define_fields_##call(void) \
+ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
{ \
struct ftrace_raw_##call field; \
- struct ftrace_event_call *event_call = &event_##call; \
int ret; \
\
__common_field(int, type, 1); \
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index b568ade..af8fb8e 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -941,7 +941,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
id);
if (call->define_fields) {
- ret = call->define_fields();
+ ret = call->define_fields(call);
if (ret < 0) {
pr_warning("Could not initialize trace point"
" events/%s\n", call->name);
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 956d4bc..cf2c752 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -119,7 +119,7 @@ ftrace_format_##call(struct ftrace_event_call *unused, \
#undef TRACE_EVENT_FORMAT
#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \
-int ftrace_define_fields_##call(void); \
+int ftrace_define_fields_##call(struct ftrace_event_call *event_call); \
static int ftrace_raw_init_event_##call(void); \
\
struct ftrace_event_call __used \
@@ -184,9 +184,8 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
#undef TRACE_EVENT_FORMAT
#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \
int \
-ftrace_define_fields_##call(void) \
+ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
{ \
- struct ftrace_event_call *event_call = &event_##call; \
struct args field; \
int ret; \
\
next prev parent reply other threads:[~2009-08-19 13:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 7:51 [PATCH 0/5] tracing/syscalls: Add filtering support Li Zefan
2009-08-19 7:52 ` [PATCH 1/5] tracing/syscalls: Fix fields format for enter events Li Zefan
2009-08-19 13:31 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19 7:53 ` [PATCH 2/5] tracing/syscalls: Add fields format for exit events Li Zefan
2009-08-19 13:31 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19 7:53 ` [PATCH 3/5] tracing/events: Add ftrace_event_call param to define_fields() Li Zefan
2009-08-19 13:31 ` tip-bot for Li Zefan [this message]
2009-08-19 7:54 ` [PATCH 4/5] tracing/events: Add trace_define_common_fields() Li Zefan
2009-08-19 13:31 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19 7:54 ` [PATCH 5/5] tracing/syscalls: Add filtering support Li Zefan
2009-08-19 13:32 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19 14:55 ` [PATCH 0/5] " Frederic Weisbecker
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=tip-14be96c9716cb8c46dca94bd890defd7856e0734@git.kernel.org \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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 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.