diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-24 01:10:15 -0400 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-24 09:33:30 -0400 |
commit | 8aef2d2856158a36c295a8d1288281e4839bff13 (patch) | |
tree | eef85397dedcad001982724e0be2da6dc089b39f /include/linux/sched.h | |
parent | 05ce5818adee8f8efd0a5ca0d900a6789012516b (diff) |
function-graph: ignore times across schedule
Impact: more accurate timings
The current method of function graph tracing does not take into
account the time spent when a task is not running. This shows functions
that call schedule have increased costs:
3) + 18.664 us | }
------------------------------------------
3) <idle>-0 => kblockd-123
------------------------------------------
3) | finish_task_switch() {
3) 1.441 us | _spin_unlock_irq();
3) 3.966 us | }
3) ! 2959.433 us | }
3) ! 2961.465 us | }
This patch uses the tracepoint in the scheduling context switch to
account for time that has elapsed while a task is scheduled out.
Now we see:
------------------------------------------
3) <idle>-0 => edac-po-1067
------------------------------------------
3) | finish_task_switch() {
3) 0.685 us | _spin_unlock_irq();
3) 2.331 us | }
3) + 41.439 us | }
3) + 42.663 us | }
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 89cd308cc7a5..471e36d30123 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1409,6 +1409,8 @@ struct task_struct { | |||
1409 | int curr_ret_stack; | 1409 | int curr_ret_stack; |
1410 | /* Stack of return addresses for return function tracing */ | 1410 | /* Stack of return addresses for return function tracing */ |
1411 | struct ftrace_ret_stack *ret_stack; | 1411 | struct ftrace_ret_stack *ret_stack; |
1412 | /* time stamp for last schedule */ | ||
1413 | unsigned long long ftrace_timestamp; | ||
1412 | /* | 1414 | /* |
1413 | * Number of functions that haven't been traced | 1415 | * Number of functions that haven't been traced |
1414 | * because of depth overrun. | 1416 | * because of depth overrun. |