Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199136
b: refs/heads/master
c: 0405ab8
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 14, 2010
1 parent b944a85 commit 338b66c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e33af029556cb8bd22bf4f86f42d540249177ea
refs/heads/master: 0405ab80aa94afb13bf9ac4a6fc9f2923d4b9114
2 changes: 1 addition & 1 deletion trunk/include/linux/ftrace_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ struct ftrace_event_class {
int (*define_fields)(struct ftrace_event_call *);
struct list_head *(*get_fields)(struct ftrace_event_call *);
struct list_head fields;
int (*raw_init)(struct ftrace_event_call *);
};

struct ftrace_event_call {
Expand All @@ -144,7 +145,6 @@ struct ftrace_event_call {
int enabled;
int id;
const char *print_fmt;
int (*raw_init)(struct ftrace_event_call *);
int filter_active;
struct event_filter *filter;
void *mod;
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ extern struct ftrace_event_class event_class_syscall_exit;
.name = "sys_enter"#sname, \
.class = &event_class_syscall_enter, \
.event = &enter_syscall_print_##sname, \
.raw_init = init_syscall_trace, \
.data = (void *)&__syscall_meta_##sname,\
}

Expand All @@ -153,7 +152,6 @@ extern struct ftrace_event_class event_class_syscall_exit;
.name = "sys_exit"#sname, \
.class = &event_class_syscall_exit, \
.event = &exit_syscall_print_##sname, \
.raw_init = init_syscall_trace, \
.data = (void *)&__syscall_meta_##sname,\
}

Expand Down
9 changes: 4 additions & 5 deletions trunk/include/trace/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,16 +431,16 @@ static inline notrace int ftrace_get_offsets_##call( \
* static struct ftrace_event_class __used event_class_<template> = {
* .system = "<system>",
* .define_fields = ftrace_define_fields_<call>,
* .fields = LIST_HEAD_INIT(event_class_##call.fields), \
* .probe = ftrace_raw_event_##call, \
* .fields = LIST_HEAD_INIT(event_class_##call.fields),
* .raw_init = trace_event_raw_init,
* .probe = ftrace_raw_event_##call,
* };
*
* static struct ftrace_event_call __used
* __attribute__((__aligned__(4)))
* __attribute__((section("_ftrace_events"))) event_<call> = {
* .name = "<call>",
* .class = event_class_<template>,
* .raw_init = trace_event_raw_init,
* .event = &ftrace_event_type_<call>,
* .print_fmt = print_fmt_<call>,
* };
Expand Down Expand Up @@ -566,6 +566,7 @@ static struct ftrace_event_class __used event_class_##call = { \
.system = __stringify(TRACE_SYSTEM), \
.define_fields = ftrace_define_fields_##call, \
.fields = LIST_HEAD_INIT(event_class_##call.fields),\
.raw_init = trace_event_raw_init, \
.probe = ftrace_raw_event_##call, \
_TRACE_PERF_INIT(call) \
};
Expand All @@ -579,7 +580,6 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
.name = #call, \
.class = &event_class_##template, \
.event = &ftrace_event_type_##call, \
.raw_init = trace_event_raw_init, \
.print_fmt = print_fmt_##template, \
};

Expand All @@ -594,7 +594,6 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
.name = #call, \
.class = &event_class_##template, \
.event = &ftrace_event_type_##call, \
.raw_init = trace_event_raw_init, \
.print_fmt = print_fmt_##call, \
}

Expand Down
12 changes: 6 additions & 6 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,8 @@ static int __trace_add_event_call(struct ftrace_event_call *call)
if (!call->name)
return -EINVAL;

if (call->raw_init) {
ret = call->raw_init(call);
if (call->class->raw_init) {
ret = call->class->raw_init(call);
if (ret < 0) {
if (ret != -ENOSYS)
pr_warning("Could not initialize trace "
Expand Down Expand Up @@ -1170,8 +1170,8 @@ static void trace_module_add_events(struct module *mod)
/* The linker may leave blanks */
if (!call->name)
continue;
if (call->raw_init) {
ret = call->raw_init(call);
if (call->class->raw_init) {
ret = call->class->raw_init(call);
if (ret < 0) {
if (ret != -ENOSYS)
pr_warning("Could not initialize trace "
Expand Down Expand Up @@ -1324,8 +1324,8 @@ static __init int event_trace_init(void)
/* The linker may leave blanks */
if (!call->name)
continue;
if (call->raw_init) {
ret = call->raw_init(call);
if (call->class->raw_init) {
ret = call->class->raw_init(call);
if (ret < 0) {
if (ret != -ENOSYS)
pr_warning("Could not initialize trace "
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ static int ftrace_raw_init_event(struct ftrace_event_call *call)
struct ftrace_event_class event_class_ftrace_##call = { \
.system = __stringify(TRACE_SYSTEM), \
.define_fields = ftrace_define_fields_##call, \
.raw_init = ftrace_raw_init_event, \
}; \
\
struct ftrace_event_call __used \
Expand All @@ -166,7 +167,6 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
.name = #call, \
.id = type, \
.class = &event_class_ftrace_##call, \
.raw_init = ftrace_raw_init_event, \
.print_fmt = print, \
}; \

Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/trace/trace_kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,13 +1359,13 @@ static int register_probe_event(struct trace_probe *tp)
/* Initialize ftrace_event_call */
if (probe_is_return(tp)) {
tp->event.trace = print_kretprobe_event;
call->raw_init = probe_event_raw_init;
INIT_LIST_HEAD(&call->class->fields);
call->class->raw_init = probe_event_raw_init;
call->class->define_fields = kretprobe_event_define_fields;
} else {
tp->event.trace = print_kprobe_event;
call->raw_init = probe_event_raw_init;
INIT_LIST_HEAD(&call->class->fields);
tp->event.trace = print_kprobe_event;
call->class->raw_init = probe_event_raw_init;
call->class->define_fields = kprobe_event_define_fields;
}
if (set_print_fmt(tp) < 0)
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/trace/trace_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ struct ftrace_event_class event_class_syscall_enter = {
.reg = syscall_enter_register,
.define_fields = syscall_enter_define_fields,
.get_fields = syscall_get_enter_fields,
.raw_init = init_syscall_trace,
};

struct ftrace_event_class event_class_syscall_exit = {
.system = "syscalls",
.reg = syscall_exit_register,
.define_fields = syscall_exit_define_fields,
.get_fields = syscall_get_exit_fields,
.raw_init = init_syscall_trace,
};

extern unsigned long __start_syscalls_metadata[];
Expand Down

0 comments on commit 338b66c

Please sign in to comment.