Em Fri, Jan 13, 2017 at 07:45:21PM +0900, Namhyung Kim escreveu:
> @@ -1943,8 +1968,16 @@ static void timehist_update_runtime_stats(struct 
> thread_runtime *r,
>  
>               if (r->last_time > tprev)
>                       pr_debug("time travel: last sched out time for task > 
> previous sched_switch event\n");
> -             else if (r->last_time)
> -                     r->dt_wait = tprev - r->last_time;
> +             else if (r->last_time) {
> +                     u64 wait = tprev - r->last_time;
> +
> +                     if (r->last_state == TASK_RUNNING)
> +                             r->dt_preempt = wait;
> +                     else if (r->last_state == TASK_UNINTERRUPTIBLE)
> +                             r->dt_iowait = wait;
> +                     else
> +                             r->dt_sleep = wait;
> +             }

s/wait/dt_wait/g to fix the build on older distros where 'wait' shadows
a global declaration.

- Arnaldo

Reply via email to