Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121245
b: refs/heads/master
c: 62679ef
h: refs/heads/master
i:
  121243: 8468d0a
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Dec 3, 2008
1 parent 69103aa commit 7411cdb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e49dc19c6a19ea112fcb94b7c62ec62cdd5c08aa
refs/heads/master: 62679efe0a5f02987a621942afc5979a80a6ca5a
17 changes: 17 additions & 0 deletions trunk/arch/x86/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,23 @@ static void pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret)
int index;

index = current->curr_ret_stack;

if (unlikely(index < 0)) {
ftrace_graph_stop();
WARN_ON(1);
/* Might as well panic, otherwise we have no where to go */
*ret = (unsigned long)panic;
return;
}

*ret = current->ret_stack[index].ret;
trace->func = current->ret_stack[index].func;
trace->calltime = current->ret_stack[index].calltime;
trace->overrun = atomic_read(&current->trace_overrun);
trace->depth = index;
barrier();
current->curr_ret_stack--;

}

/*
Expand All @@ -442,6 +452,13 @@ unsigned long ftrace_return_to_handler(void)
trace.rettime = cpu_clock(raw_smp_processor_id());
ftrace_graph_return(&trace);

if (unlikely(!ret)) {
ftrace_graph_stop();
WARN_ON(1);
/* Might as well panic. What else to do? */
ret = (unsigned long)panic;
}

return ret;
}

Expand Down

0 comments on commit 7411cdb

Please sign in to comment.