aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace_event.h19
-rw-r--r--include/linux/syscalls.h4
-rw-r--r--include/trace/ftrace.h16
-rw-r--r--include/trace/syscall.h11
4 files changed, 27 insertions, 23 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index ace2da9e0a0..1ab3089b5c5 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -112,12 +112,12 @@ struct ftrace_event_call {
112 struct dentry *dir; 112 struct dentry *dir;
113 struct trace_event *event; 113 struct trace_event *event;
114 int enabled; 114 int enabled;
115 int (*regfunc)(void *); 115 int (*regfunc)(struct ftrace_event_call *);
116 void (*unregfunc)(void *); 116 void (*unregfunc)(struct ftrace_event_call *);
117 int id; 117 int id;
118 int (*raw_init)(void); 118 int (*raw_init)(struct ftrace_event_call *);
119 int (*show_format)(struct ftrace_event_call *call, 119 int (*show_format)(struct ftrace_event_call *,
120 struct trace_seq *s); 120 struct trace_seq *);
121 int (*define_fields)(struct ftrace_event_call *); 121 int (*define_fields)(struct ftrace_event_call *);
122 struct list_head fields; 122 struct list_head fields;
123 int filter_active; 123 int filter_active;
@@ -147,11 +147,12 @@ enum {
147 FILTER_PTR_STRING, 147 FILTER_PTR_STRING,
148}; 148};
149 149
150extern int trace_define_field(struct ftrace_event_call *call,
151 const char *type, const char *name,
152 int offset, int size, int is_signed,
153 int filter_type);
154extern int trace_define_common_fields(struct ftrace_event_call *call); 150extern int trace_define_common_fields(struct ftrace_event_call *call);
151extern int trace_define_field(struct ftrace_event_call *call, char *type,
152 char *name, int offset, int size, int is_signed,
153 int filter_type);
154extern int trace_add_event_call(struct ftrace_event_call *call);
155extern void trace_remove_event_call(struct ftrace_event_call *call);
155 156
156#define is_signed_type(type) (((type)(-1)) < 0) 157#define is_signed_type(type) (((type)(-1)) < 0)
157 158
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index f124c899555..646102eeff9 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -165,7 +165,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
165 struct trace_event enter_syscall_print_##sname = { \ 165 struct trace_event enter_syscall_print_##sname = { \
166 .trace = print_syscall_enter, \ 166 .trace = print_syscall_enter, \
167 }; \ 167 }; \
168 static int init_enter_##sname(void) \ 168 static int init_enter_##sname(struct ftrace_event_call *call) \
169 { \ 169 { \
170 int num, id; \ 170 int num, id; \
171 num = syscall_name_to_nr("sys"#sname); \ 171 num = syscall_name_to_nr("sys"#sname); \
@@ -202,7 +202,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
202 struct trace_event exit_syscall_print_##sname = { \ 202 struct trace_event exit_syscall_print_##sname = { \
203 .trace = print_syscall_exit, \ 203 .trace = print_syscall_exit, \
204 }; \ 204 }; \
205 static int init_exit_##sname(void) \ 205 static int init_exit_##sname(struct ftrace_event_call *call) \
206 { \ 206 { \
207 int num, id; \ 207 int num, id; \
208 num = syscall_name_to_nr("sys"#sname); \ 208 num = syscall_name_to_nr("sys"#sname); \
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 360a77ad79e..f2bd7a8f8e8 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -434,7 +434,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
434 * event_trace_printk(_RET_IP_, "<call>: " <fmt>); 434 * event_trace_printk(_RET_IP_, "<call>: " <fmt>);
435 * } 435 * }
436 * 436 *
437 * static int ftrace_reg_event_<call>(void) 437 * static int ftrace_reg_event_<call>(struct ftrace_event_call *unused)
438 * { 438 * {
439 * int ret; 439 * int ret;
440 * 440 *
@@ -445,7 +445,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
445 * return ret; 445 * return ret;
446 * } 446 * }
447 * 447 *
448 * static void ftrace_unreg_event_<call>(void) 448 * static void ftrace_unreg_event_<call>(struct ftrace_event_call *unused)
449 * { 449 * {
450 * unregister_trace_<call>(ftrace_event_<call>); 450 * unregister_trace_<call>(ftrace_event_<call>);
451 * } 451 * }
@@ -478,7 +478,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
478 * trace_current_buffer_unlock_commit(event, irq_flags, pc); 478 * trace_current_buffer_unlock_commit(event, irq_flags, pc);
479 * } 479 * }
480 * 480 *
481 * static int ftrace_raw_reg_event_<call>(void) 481 * static int ftrace_raw_reg_event_<call>(struct ftrace_event_call *unused)
482 * { 482 * {
483 * int ret; 483 * int ret;
484 * 484 *
@@ -489,7 +489,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
489 * return ret; 489 * return ret;
490 * } 490 * }
491 * 491 *
492 * static void ftrace_unreg_event_<call>(void) 492 * static void ftrace_unreg_event_<call>(struct ftrace_event_call *unused)
493 * { 493 * {
494 * unregister_trace_<call>(ftrace_raw_event_<call>); 494 * unregister_trace_<call>(ftrace_raw_event_<call>);
495 * } 495 * }
@@ -498,7 +498,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
498 * .trace = ftrace_raw_output_<call>, <-- stage 2 498 * .trace = ftrace_raw_output_<call>, <-- stage 2
499 * }; 499 * };
500 * 500 *
501 * static int ftrace_raw_init_event_<call>(void) 501 * static int ftrace_raw_init_event_<call>(struct ftrace_event_call *unused)
502 * { 502 * {
503 * int id; 503 * int id;
504 * 504 *
@@ -592,7 +592,7 @@ static void ftrace_raw_event_##call(proto) \
592 trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ 592 trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
593} \ 593} \
594 \ 594 \
595static int ftrace_raw_reg_event_##call(void *ptr) \ 595static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\
596{ \ 596{ \
597 int ret; \ 597 int ret; \
598 \ 598 \
@@ -603,7 +603,7 @@ static int ftrace_raw_reg_event_##call(void *ptr) \
603 return ret; \ 603 return ret; \
604} \ 604} \
605 \ 605 \
606static void ftrace_raw_unreg_event_##call(void *ptr) \ 606static void ftrace_raw_unreg_event_##call(struct ftrace_event_call *unused)\
607{ \ 607{ \
608 unregister_trace_##call(ftrace_raw_event_##call); \ 608 unregister_trace_##call(ftrace_raw_event_##call); \
609} \ 609} \
@@ -612,7 +612,7 @@ static struct trace_event ftrace_event_type_##call = { \
612 .trace = ftrace_raw_output_##call, \ 612 .trace = ftrace_raw_output_##call, \
613}; \ 613}; \
614 \ 614 \
615static int ftrace_raw_init_event_##call(void) \ 615static int ftrace_raw_init_event_##call(struct ftrace_event_call *unused)\
616{ \ 616{ \
617 int id; \ 617 int id; \
618 \ 618 \
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index 5dc283ba5ae..e290b86f616 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -39,16 +39,19 @@ void set_syscall_enter_id(int num, int id);
39void set_syscall_exit_id(int num, int id); 39void set_syscall_exit_id(int num, int id);
40extern struct trace_event event_syscall_enter; 40extern struct trace_event event_syscall_enter;
41extern struct trace_event event_syscall_exit; 41extern struct trace_event event_syscall_exit;
42extern int reg_event_syscall_enter(void *ptr); 42
43extern void unreg_event_syscall_enter(void *ptr);
44extern int reg_event_syscall_exit(void *ptr);
45extern void unreg_event_syscall_exit(void *ptr);
46extern int syscall_enter_format(struct ftrace_event_call *call, 43extern int syscall_enter_format(struct ftrace_event_call *call,
47 struct trace_seq *s); 44 struct trace_seq *s);
48extern int syscall_exit_format(struct ftrace_event_call *call, 45extern int syscall_exit_format(struct ftrace_event_call *call,
49 struct trace_seq *s); 46 struct trace_seq *s);
50extern int syscall_enter_define_fields(struct ftrace_event_call *call); 47extern int syscall_enter_define_fields(struct ftrace_event_call *call);
51extern int syscall_exit_define_fields(struct ftrace_event_call *call); 48extern int syscall_exit_define_fields(struct ftrace_event_call *call);
49extern int reg_event_syscall_enter(struct ftrace_event_call *call);
50extern void unreg_event_syscall_enter(struct ftrace_event_call *call);
51extern int reg_event_syscall_exit(struct ftrace_event_call *call);
52extern void unreg_event_syscall_exit(struct ftrace_event_call *call);
53extern int
54ftrace_format_syscall(struct ftrace_event_call *call, struct trace_seq *s);
52enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags); 55enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags);
53enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); 56enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags);
54#endif 57#endif