Re: [PATCH] perf sched: fix wrong conversion of task state

From: David Ahern
Date: Thu Jul 28 2016 - 10:26:58 EST


On 7/27/16 9:10 PM, Tomoki Sekiyama wrote:
But that means we cannot handle preemption correctly as far as
sched:sched_switch
event uses TASK_STATE_MAX to mark preempted tasks.

Should we stop using TASK_STATE_MAX for preempted tasks in ftrace and
use (1 << 63) or something that doesn't change on kernel version instead?

ftrace printing is within the kernel so it has consistency.

It is the save data and analyze later use case that can not assume TASK_STATE_MAX means preemption since the value of TASK_STATE_MAX is kernel version dependent.