aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-23 23:38:49 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-24 09:31:34 -0400
commit5d1a03dc541dc6672e60e57249ed22f40654ca47 (patch)
tree0b72061cc8c56797474d2efbfe1954ce0ad27ce8 /kernel
parent098335215a4921a8a54193829eaed602dca24df5 (diff)
function-graph: moved the timestamp from arch to generic code
This patch move the timestamp from happening in the arch specific code into the general code. This allows for better control by the tracer to time manipulation. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_functions_graph.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index e876816fa8e7..d28687e7b3a7 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -57,9 +57,9 @@ static struct tracer_flags tracer_flags = {
57 57
58/* Add a function return address to the trace stack on thread info.*/ 58/* Add a function return address to the trace stack on thread info.*/
59int 59int
60ftrace_push_return_trace(unsigned long ret, unsigned long long time, 60ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth)
61 unsigned long func, int *depth)
62{ 61{
62 unsigned long long calltime;
63 int index; 63 int index;
64 64
65 if (!current->ret_stack) 65 if (!current->ret_stack)
@@ -71,11 +71,13 @@ ftrace_push_return_trace(unsigned long ret, unsigned long long time,
71 return -EBUSY; 71 return -EBUSY;
72 } 72 }
73 73
74 calltime = trace_clock_local();
75
74 index = ++current->curr_ret_stack; 76 index = ++current->curr_ret_stack;
75 barrier(); 77 barrier();
76 current->ret_stack[index].ret = ret; 78 current->ret_stack[index].ret = ret;
77 current->ret_stack[index].func = func; 79 current->ret_stack[index].func = func;
78 current->ret_stack[index].calltime = time; 80 current->ret_stack[index].calltime = calltime;
79 *depth = index; 81 *depth = index;
80 82
81 return 0; 83 return 0;