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 08/10] tracing: Have syscall tracing call its own init function
Date: Tue, 29 Dec 2009 11:22:39 -0500 [thread overview]
Message-ID: <20091229162638.963250308@goodmis.org> (raw)
In-Reply-To: <20091229162231.441352392@goodmis.org>
[-- Attachment #1: 0008-tracing-Have-syscall-tracing-call-its-own-init-funct.patch --]
[-- Type: text/plain, Size: 2226 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
In the clean up of having all events call one specific function,
the syscall event init was changed to call this helper function.
With the new print_fmt updates, the syscalls need to do special
initializations. This patch converts the syscall events to call
its own init function again.
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/syscalls.h | 4 ++--
kernel/trace/trace_syscalls.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 207466a..ed353d2 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -143,7 +143,7 @@ struct perf_event_attr;
.name = "sys_enter"#sname, \
.system = "syscalls", \
.event = &enter_syscall_print_##sname, \
- .raw_init = trace_event_raw_init, \
+ .raw_init = init_syscall_trace, \
.show_format = syscall_enter_format, \
.define_fields = syscall_enter_define_fields, \
.regfunc = reg_event_syscall_enter, \
@@ -165,7 +165,7 @@ struct perf_event_attr;
.name = "sys_exit"#sname, \
.system = "syscalls", \
.event = &exit_syscall_print_##sname, \
- .raw_init = trace_event_raw_init, \
+ .raw_init = init_syscall_trace, \
.show_format = syscall_exit_format, \
.define_fields = syscall_exit_define_fields, \
.regfunc = reg_event_syscall_exit, \
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 1352b0a..a78e863 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -450,14 +450,14 @@ int init_syscall_trace(struct ftrace_event_call *call)
if (set_syscall_print_fmt(call) < 0)
return -ENOMEM;
- id = register_ftrace_event(call->event);
- if (!id) {
+ id = trace_event_raw_init(call);
+
+ if (id < 0) {
free_syscall_print_fmt(call);
- return -ENODEV;
+ return id;
}
- call->id = id;
- INIT_LIST_HEAD(&call->fields);
- return 0;
+
+ return id;
}
int __init init_ftrace_syscalls(void)
--
1.6.5
next prev parent reply other threads:[~2009-12-29 16:27 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 ` [PATCH 03/10] tracing: Have __dynamic_array() define a field Steven Rostedt
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 ` Steven Rostedt [this message]
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=20091229162638.963250308@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®