diff options
-rw-r--r-- | include/trace/events/sched.h | 7 | ||||
-rw-r--r-- | kernel/sched/fair.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 959ff18b63b6..e33ed1bfa113 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -331,6 +331,13 @@ DEFINE_EVENT(sched_stat_template, sched_stat_iowait, | |||
331 | TP_ARGS(tsk, delay)); | 331 | TP_ARGS(tsk, delay)); |
332 | 332 | ||
333 | /* | 333 | /* |
334 | * Tracepoint for accounting blocked time (time the task is in uninterruptible). | ||
335 | */ | ||
336 | DEFINE_EVENT(sched_stat_template, sched_stat_blocked, | ||
337 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
338 | TP_ARGS(tsk, delay)); | ||
339 | |||
340 | /* | ||
334 | * Tracepoint for accounting runtime (time the task is executing | 341 | * Tracepoint for accounting runtime (time the task is executing |
335 | * on a CPU). | 342 | * on a CPU). |
336 | */ | 343 | */ |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index cd3b64219d9f..7c62e2bf234f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -1030,6 +1030,8 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
1030 | trace_sched_stat_iowait(tsk, delta); | 1030 | trace_sched_stat_iowait(tsk, delta); |
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | trace_sched_stat_blocked(tsk, delta); | ||
1034 | |||
1033 | /* | 1035 | /* |
1034 | * Blocking time is in units of nanosecs, so shift by | 1036 | * Blocking time is in units of nanosecs, so shift by |
1035 | * 20 to get a milliseconds-range estimation of the | 1037 | * 20 to get a milliseconds-range estimation of the |