tracing: Move tracepoint callbacks from declaration to definition
[pandora-kernel.git] / include / trace / syscall.h
index df62840..4e19430 100644 (file)
@@ -8,23 +8,23 @@
 #include <asm/ptrace.h>
 
 
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
+
 extern void syscall_regfunc(void);
 extern void syscall_unregfunc(void);
 
-DECLARE_TRACE_WITH_CALLBACK(syscall_enter,
+DECLARE_TRACE(syscall_enter,
        TP_PROTO(struct pt_regs *regs, long id),
-       TP_ARGS(regs, id),
-       syscall_regfunc,
-       syscall_unregfunc
+       TP_ARGS(regs, id)
 );
 
-DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
+DECLARE_TRACE(syscall_exit,
        TP_PROTO(struct pt_regs *regs, long ret),
-       TP_ARGS(regs, ret),
-       syscall_regfunc,
-       syscall_unregfunc
+       TP_ARGS(regs, ret)
 );
 
+#endif
+
 /*
  * A syscall entry in the ftrace syscalls array.
  *
@@ -34,6 +34,8 @@ DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
  * @args: list of args as strings (args[i] matches types[i])
  * @enter_id: associated ftrace enter event id
  * @exit_id: associated ftrace exit event id
+ * @enter_event: associated syscall_enter trace event
+ * @exit_event: associated syscall_exit trace event
  */
 struct syscall_metadata {
        const char      *name;
@@ -42,6 +44,9 @@ struct syscall_metadata {
        const char      **args;
        int             enter_id;
        int             exit_id;
+
+       struct ftrace_event_call *enter_event;
+       struct ftrace_event_call *exit_event;
 };
 
 #ifdef CONFIG_FTRACE_SYSCALLS
@@ -55,8 +60,21 @@ extern int reg_event_syscall_enter(void *ptr);
 extern void unreg_event_syscall_enter(void *ptr);
 extern int reg_event_syscall_exit(void *ptr);
 extern void unreg_event_syscall_exit(void *ptr);
+extern int syscall_enter_format(struct ftrace_event_call *call,
+                               struct trace_seq *s);
+extern int syscall_exit_format(struct ftrace_event_call *call,
+                               struct trace_seq *s);
+extern int syscall_enter_define_fields(struct ftrace_event_call *call);
+extern int syscall_exit_define_fields(struct ftrace_event_call *call);
 enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags);
 enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags);
+#endif
+#ifdef CONFIG_EVENT_PROFILE
+int reg_prof_syscall_enter(char *name);
+void unreg_prof_syscall_enter(char *name);
+int reg_prof_syscall_exit(char *name);
+void unreg_prof_syscall_exit(char *name);
+
 #endif
 
 #endif /* _TRACE_SYSCALL_H */