From 60f39aea78c0986731ae3fbe06e720d22ec388d3 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec <tgrabiec@cloudius-systems.com> Date: Mon, 13 Jan 2014 13:08:26 +0100 Subject: [PATCH] sched: add tracepoint for resuming from wait Useful for calculating time during which thread was scheduled out because of wait(). Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com> --- core/sched.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/sched.cc b/core/sched.cc index 0848e4587..83fc2f70d 100644 --- a/core/sched.cc +++ b/core/sched.cc @@ -33,6 +33,7 @@ namespace sched { TRACEPOINT(trace_sched_switch, "to %p vold=%g vnew=%g", thread*, float, float); TRACEPOINT(trace_sched_wait, ""); +TRACEPOINT(trace_sched_wait_ret, ""); TRACEPOINT(trace_sched_wake, "wake %p", thread*); TRACEPOINT(trace_sched_migrate, "thread=%p cpu=%d", thread*, unsigned); TRACEPOINT(trace_sched_queue, "thread=%p", thread*); @@ -745,6 +746,7 @@ void thread::wait() { trace_sched_wait(); schedule(); + trace_sched_wait_ret(); } void thread::sleep_until(s64 abstime) -- GitLab