Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121264
b: refs/heads/master
c: 21a8c46
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Dec 5, 2008
1 parent 221c779 commit 79742d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 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: 77d683f3e0258d522c5506e7b5fd05c9411184d9
refs/heads/master: 21a8c466f99063eeb8567318b4e305eda9015408
11 changes: 11 additions & 0 deletions trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/types.h>
#include <linux/kallsyms.h>
#include <linux/bitops.h>
#include <linux/sched.h>

#ifdef CONFIG_FUNCTION_TRACER

Expand Down Expand Up @@ -387,9 +388,19 @@ extern void unregister_ftrace_graph(void);

extern void ftrace_graph_init_task(struct task_struct *t);
extern void ftrace_graph_exit_task(struct task_struct *t);

static inline int task_curr_ret_stack(struct task_struct *t)
{
return t->curr_ret_stack;
}
#else
static inline void ftrace_graph_init_task(struct task_struct *t) { }
static inline void ftrace_graph_exit_task(struct task_struct *t) { }

static inline int task_curr_ret_stack(struct task_struct *tsk)
{
return -1;
}
#endif

#ifdef CONFIG_TRACING
Expand Down
8 changes: 1 addition & 7 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3657,13 +3657,7 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...)
return 0;

va_start(ap, fmt);

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
ret = trace_vprintk(ip, current->curr_ret_stack, fmt, ap);
#else
ret = trace_vprintk(ip, -1, fmt, ap);
#endif

ret = trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap);
va_end(ap);
return ret;
}
Expand Down

0 comments on commit 79742d8

Please sign in to comment.