]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ftrace.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[linux-2.6-omap-h63xx.git] / include / linux / ftrace.h
index 1cc8ca453a9b47385a2469538278fb988ff17559..015a3d22cf7434deb500233623ae14b778d05e5b 100644 (file)
@@ -145,10 +145,15 @@ enum {
 };
 
 struct dyn_ftrace {
-       struct list_head        list;
-       unsigned long           ip; /* address of mcount call-site */
-       unsigned long           flags;
-       struct dyn_arch_ftrace  arch;
+       union {
+               unsigned long           ip; /* address of mcount call-site */
+               struct dyn_ftrace       *freelist;
+       };
+       union {
+               unsigned long           flags;
+               struct dyn_ftrace       *newlist;
+       };
+       struct dyn_arch_ftrace          arch;
 };
 
 int ftrace_force_update(void);
@@ -223,31 +228,6 @@ extern int ftrace_make_nop(struct module *mod,
  */
 extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr);
 
-#ifdef CONFIG_TRACE_BPRINTK
-extern int trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
-extern int __trace_bprintk(unsigned long ip, const char *fmt, ...)
-               __attribute__ ((format (printf, 2, 3)));
-
-static inline void  ____trace_bprintk_check_format(const char *fmt, ...)
-               __attribute__ ((format (printf, 1, 2)));
-static inline void ____trace_bprintk_check_format(const char *fmt, ...) {}
-#define __trace_bprintk_check_format(fmt, args...)                     \
-do {                                                                   \
-       if (0)                                                          \
-               ____trace_bprintk_check_format(fmt, ##args);            \
-} while (0)
-
-#define trace_bprintk(fmt, args...)                                    \
-do {                                                                   \
-       static char *__attribute__((section("__trace_bprintk_fmt")))    \
-                       trace_bprintk_fmt = fmt;                        \
-       __trace_bprintk_check_format(fmt, ##args);                      \
-       __trace_bprintk(_THIS_IP_, trace_bprintk_fmt, ##args);  \
-} while (0)
-#else
-#define trace_bprintk trace_printk
-#endif
-
 /* May be defined in arch */
 extern int ftrace_arch_read_dyn_info(char *buf, int size);
 
@@ -395,8 +375,7 @@ struct ftrace_ret_stack {
 extern void return_to_handler(void);
 
 extern int
-ftrace_push_return_trace(unsigned long ret, unsigned long long time,
-                        unsigned long func, int *depth);
+ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth);
 extern void
 ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret);
 
@@ -528,4 +507,33 @@ static inline void trace_hw_branch_oops(void) {}
 
 #endif /* CONFIG_HW_BRANCH_TRACER */
 
+/*
+ * A syscall entry in the ftrace syscalls array.
+ *
+ * @name: name of the syscall
+ * @nb_args: number of parameters it takes
+ * @types: list of types as strings
+ * @args: list of args as strings (args[i] matches types[i])
+ */
+struct syscall_metadata {
+       const char      *name;
+       int             nb_args;
+       const char      **types;
+       const char      **args;
+};
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+extern void arch_init_ftrace_syscalls(void);
+extern struct syscall_metadata *syscall_nr_to_meta(int nr);
+extern void start_ftrace_syscalls(void);
+extern void stop_ftrace_syscalls(void);
+extern void ftrace_syscall_enter(struct pt_regs *regs);
+extern void ftrace_syscall_exit(struct pt_regs *regs);
+#else
+static inline void start_ftrace_syscalls(void) { }
+static inline void stop_ftrace_syscalls(void) { }
+static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
+static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
+#endif
+
 #endif /* _LINUX_FTRACE_H */