From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Jason Baron <jbaron@redhat.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Jiaying Zhang <jiayingz@google.com>,
Martin Bligh <mbligh@google.com>, Li Zefan <lizf@cn.fujitsu.com>,
Masami Hiramatsu <mhiramat@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 08/16] tracing: Add ftrace_event_call void * 'data' field
Date: Tue, 11 Aug 2009 20:48:57 +0200 [thread overview]
Message-ID: <1250016545-6601-9-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1250016545-6601-1-git-send-email-fweisbec@gmail.com>
From: Jason Baron <jbaron@redhat.com>
add an optional void * pointer to 'ftrace_event_call' that is
passed in for regfunc and unregfunc.
This prepares for syscall tracepoints creation by passing the name of
the syscall we want to trace and then retrieve its number through our
arch syscall table.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Jiaying Zhang <jiayingz@google.com>
Cc: Martin Bligh <mbligh@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
include/linux/ftrace_event.h | 5 +++--
include/trace/ftrace.h | 4 ++--
kernel/trace/trace_events.c | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index ac8c6f8..8544f12 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -112,8 +112,8 @@ struct ftrace_event_call {
struct dentry *dir;
struct trace_event *event;
int enabled;
- int (*regfunc)(void);
- void (*unregfunc)(void);
+ int (*regfunc)(void *);
+ void (*unregfunc)(void *);
int id;
int (*raw_init)(void);
int (*show_format)(struct trace_seq *s);
@@ -122,6 +122,7 @@ struct ftrace_event_call {
int filter_active;
struct event_filter *filter;
void *mod;
+ void *data;
atomic_t profile_count;
int (*profile_enable)(struct ftrace_event_call *);
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 25d3b02..46d81b5 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -568,7 +568,7 @@ static void ftrace_raw_event_##call(proto) \
trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
} \
\
-static int ftrace_raw_reg_event_##call(void) \
+static int ftrace_raw_reg_event_##call(void *ptr) \
{ \
int ret; \
\
@@ -579,7 +579,7 @@ static int ftrace_raw_reg_event_##call(void) \
return ret; \
} \
\
-static void ftrace_raw_unreg_event_##call(void) \
+static void ftrace_raw_unreg_event_##call(void *ptr) \
{ \
unregister_trace_##call(ftrace_raw_event_##call); \
} \
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index f95f847..1d289e2 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -86,14 +86,14 @@ static void ftrace_event_enable_disable(struct ftrace_event_call *call,
if (call->enabled) {
call->enabled = 0;
tracing_stop_cmdline_record();
- call->unregfunc();
+ call->unregfunc(call->data);
}
break;
case 1:
if (!call->enabled) {
call->enabled = 1;
tracing_start_cmdline_record();
- call->regfunc();
+ call->regfunc(call->data);
}
break;
}
--
1.6.2.3
next prev parent reply other threads:[~2009-08-11 18:51 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 18:48 [GIT PULL] tracing: Syscalls trace events + perf support Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 01/16] tracing: Rename set_tracer_flags()'s local variable trace_flags Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 02/16] tracing: Map syscall name to number Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 03/16] tracing: Call arch_init_ftrace_syscalls at boot Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 04/16] tracing: Add DECLARE_TRACE_WITH_CALLBACK() macro Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 05/16] tracing: Add syscall tracepoints Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 06/16] tracing: Update FTRACE_SYSCALL_MAX Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 07/16] tracing: Raw_init() bailout in trace event register fail case Frederic Weisbecker
2009-08-11 18:48 ` Frederic Weisbecker [this message]
2009-08-11 18:48 ` [PATCH 09/16] tracing: Add trace events for each syscall entry/exit Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 10/16] tracing: Add individual syscalls tracepoint id support Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 11/16] tracing: Add perf counter support for syscalls tracing Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 12/16] tracing: Add more namespace area to 'perf list' output Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 13/16] tracing: Convert x86_64 mmap and uname to use DEFINE_SYSCALL Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 14/16] tracing: Add ftrace event call parameter to its field descriptor handler Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 15/16] tracing: Add fields format definition for syscall events Frederic Weisbecker
2009-08-19 17:12 ` Masami Hiramatsu
2009-08-19 17:37 ` Frederic Weisbecker
2009-08-20 1:07 ` Li Zefan
2009-08-11 18:49 ` [PATCH 16/16] tracing: Support for syscall events raw records in perfcounters Frederic Weisbecker
2009-08-12 9:11 ` [GIT PULL] tracing: Syscalls trace events + perf support Ingo Molnar
2009-08-12 11:03 ` Ingo Molnar
2009-08-12 11:14 ` Ingo Molnar
2009-08-12 14:25 ` Jason Baron
2009-08-12 14:29 ` Ingo Molnar
2009-08-12 14:37 ` Jason Baron
2009-08-12 11:33 ` Frederic Weisbecker
2009-08-12 13:59 ` Jason Baron
2009-08-12 14:30 ` Ingo Molnar
2009-08-18 0:46 ` Paul Mundt
2009-08-18 7:32 ` Ingo Molnar
2009-08-18 8:51 ` [S390] ftrace: update system call tracer support Ingo Molnar
2009-08-18 8:59 ` Martin Schwidefsky
2009-08-18 10:05 ` Ingo Molnar
2009-08-18 10:22 ` Martin Schwidefsky
2009-08-18 14:56 ` Jason Baron
2009-08-18 10:25 ` [GIT PULL] tracing: Syscalls trace events + perf support Frederic Weisbecker
2009-08-18 11:06 ` Ingo Molnar
2009-08-18 11:56 ` Paul Mundt
2009-08-12 16:33 ` Masami Hiramatsu
2009-08-12 17:02 ` Masami Hiramatsu
2009-08-12 19:13 ` [RFD] Kprobes/Kretprobes " Frederic Weisbecker
2009-08-12 20:20 ` Masami Hiramatsu
2009-08-13 8:02 ` Ingo Molnar
2009-08-12 21:09 ` Peter Zijlstra
2009-08-12 21:27 ` Masami Hiramatsu
2009-08-12 21:37 ` Frederic Weisbecker
2009-08-12 21:35 ` Frederic Weisbecker
2009-08-14 15:05 ` Masami Hiramatsu
2009-08-15 14:33 ` Ingo Molnar
2009-08-17 21:58 ` Masami Hiramatsu
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=1250016545-6601-9-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=jbaron@redhat.com \
--cc=jiayingz@google.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mbligh@google.com \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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
Powered by JetHome