Commit 14be96c9 authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar

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: default avatarLi 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: default avatarIngo Molnar <mingo@elte.hu>
parent 10a5b66f
...@@ -118,7 +118,7 @@ struct ftrace_event_call { ...@@ -118,7 +118,7 @@ struct ftrace_event_call {
int (*raw_init)(void); int (*raw_init)(void);
int (*show_format)(struct ftrace_event_call *call, int (*show_format)(struct ftrace_event_call *call,
struct trace_seq *s); struct trace_seq *s);
int (*define_fields)(void); int (*define_fields)(struct ftrace_event_call *);
struct list_head fields; struct list_head fields;
int filter_active; int filter_active;
struct event_filter *filter; struct event_filter *filter;
......
...@@ -294,10 +294,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ ...@@ -294,10 +294,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
#undef TRACE_EVENT #undef TRACE_EVENT
#define TRACE_EVENT(call, proto, args, tstruct, func, print) \ #define TRACE_EVENT(call, proto, args, tstruct, func, print) \
int \ int \
ftrace_define_fields_##call(void) \ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
{ \ { \
struct ftrace_raw_##call field; \ struct ftrace_raw_##call field; \
struct ftrace_event_call *event_call = &event_##call; \
int ret; \ int ret; \
\ \
__common_field(int, type, 1); \ __common_field(int, type, 1); \
......
...@@ -941,7 +941,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, ...@@ -941,7 +941,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
id); id);
if (call->define_fields) { if (call->define_fields) {
ret = call->define_fields(); ret = call->define_fields(call);
if (ret < 0) { if (ret < 0) {
pr_warning("Could not initialize trace point" pr_warning("Could not initialize trace point"
" events/%s\n", call->name); " events/%s\n", call->name);
......
...@@ -119,7 +119,7 @@ ftrace_format_##call(struct ftrace_event_call *unused, \ ...@@ -119,7 +119,7 @@ ftrace_format_##call(struct ftrace_event_call *unused, \
#undef TRACE_EVENT_FORMAT #undef TRACE_EVENT_FORMAT
#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ #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); \ static int ftrace_raw_init_event_##call(void); \
\ \
struct ftrace_event_call __used \ struct ftrace_event_call __used \
...@@ -184,9 +184,8 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ ...@@ -184,9 +184,8 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
#undef TRACE_EVENT_FORMAT #undef TRACE_EVENT_FORMAT
#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \
int \ 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; \ struct args field; \
int ret; \ int ret; \
\ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment