Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / include / linux / ftrace.h
index 9d598bb..8a0c2f2 100644 (file)
@@ -145,9 +145,15 @@ enum {
 };
 
 struct dyn_ftrace {
-       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);
@@ -350,6 +356,9 @@ struct ftrace_graph_ret {
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 
+/* for init task */
+#define INIT_FTRACE_GRAPH              .ret_stack = NULL,
+
 /*
  * Stack of return addresses for functions
  * of a thread.
@@ -369,8 +378,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);
 
@@ -425,10 +433,11 @@ static inline void unpause_graph_tracing(void)
 {
        atomic_dec(&current->tracing_graph_pause);
 }
-#else
+#else /* !CONFIG_FUNCTION_GRAPH_TRACER */
 
 #define __notrace_funcgraph
 #define __irq_entry
+#define INIT_FTRACE_GRAPH
 
 static inline void ftrace_graph_init_task(struct task_struct *t) { }
 static inline void ftrace_graph_exit_task(struct task_struct *t) { }
@@ -440,7 +449,7 @@ static inline int task_curr_ret_stack(struct task_struct *tsk)
 
 static inline void pause_graph_tracing(void) { }
 static inline void unpause_graph_tracing(void) { }
-#endif
+#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
 
 #ifdef CONFIG_TRACING
 #include <linux/sched.h>
@@ -502,25 +511,4 @@ static inline void trace_hw_branch_oops(void) {}
 
 #endif /* CONFIG_HW_BRANCH_TRACER */
 
-/*
- * A syscall entry in the ftrace syscalls array.
- *
- * @syscall_nr: syscall number
- */
-struct syscall_trace_entry {
-       int             syscall_nr;
-};
-
-#ifdef CONFIG_FTRACE_SYSCALLS
-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 */