Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141031
b: refs/heads/master
c: 5d1a03d
h: refs/heads/master
i:
  141029: e2cf50e
  141027: 0006c14
  141023: ba49a64
v: v3
  • Loading branch information
Steven Rostedt committed Mar 24, 2009
1 parent 7ca81d1 commit 3969525
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 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: 098335215a4921a8a54193829eaed602dca24df5
refs/heads/master: 5d1a03dc541dc6672e60e57249ed22f40654ca47
6 changes: 1 addition & 5 deletions trunk/arch/x86/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ int ftrace_disable_ftrace_graph_caller(void)
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
{
unsigned long old;
unsigned long long calltime;
int faulted;
struct ftrace_graph_ent trace;
unsigned long return_hooker = (unsigned long)
Expand Down Expand Up @@ -453,10 +452,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
return;
}

calltime = trace_clock_local();

if (ftrace_push_return_trace(old, calltime,
self_addr, &trace.depth) == -EBUSY) {
if (ftrace_push_return_trace(old, self_addr, &trace.depth) == -EBUSY) {
*parent = old;
return;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,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);

Expand Down
8 changes: 5 additions & 3 deletions trunk/kernel/trace/trace_functions_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ static struct tracer_flags tracer_flags = {

/* Add a function return address to the trace stack on thread info.*/
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)
{
unsigned long long calltime;
int index;

if (!current->ret_stack)
Expand All @@ -71,11 +71,13 @@ ftrace_push_return_trace(unsigned long ret, unsigned long long time,
return -EBUSY;
}

calltime = trace_clock_local();

index = ++current->curr_ret_stack;
barrier();
current->ret_stack[index].ret = ret;
current->ret_stack[index].func = func;
current->ret_stack[index].calltime = time;
current->ret_stack[index].calltime = calltime;
*depth = index;

return 0;
Expand Down

0 comments on commit 3969525

Please sign in to comment.