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

2016-07-28 Thread Tomoki Sekiyama
Hi Hiramatsu-san, On 2016/7/28, 2016 8:43, Masami Hiramatsu wrote: > Hmm, this includes several fixes and enhancements. > 1. Use first bit of the state instead of state itself (critical bug to avoid crash?) > 2. Check the range of the array and return '?' if out (minor bug, it can access data

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

2016-07-28 Thread Tomoki Sekiyama
Hi Hiramatsu-san, On 2016/7/28, 2016 8:43, Masami Hiramatsu wrote: > Hmm, this includes several fixes and enhancements. > 1. Use first bit of the state instead of state itself (critical bug to avoid crash?) > 2. Check the range of the array and return '?' if out (minor bug, it can access data

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

2016-07-27 Thread Masami Hiramatsu
On Thu, 28 Jul 2016 01:07:40 +0900 Tomoki Sekiyama wrote: > sched_out_state() converts the prev_state u64 bitmask to a char in > a wrong way, which may cause wrong results of 'perf sched latency'. > This patch fixes the conversion. > Also, preempted tasks must be

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

2016-07-27 Thread Masami Hiramatsu
On Thu, 28 Jul 2016 01:07:40 +0900 Tomoki Sekiyama wrote: > sched_out_state() converts the prev_state u64 bitmask to a char in > a wrong way, which may cause wrong results of 'perf sched latency'. > This patch fixes the conversion. > Also, preempted tasks must be considered that they are in the

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

2016-07-27 Thread David Ahern
On 7/27/16 10:07 AM, Tomoki Sekiyama wrote: sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Also, preempted tasks must be considered that they are in the THREAD_WAIT_CPU state.

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

2016-07-27 Thread David Ahern
On 7/27/16 10:07 AM, Tomoki Sekiyama wrote: sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Also, preempted tasks must be considered that they are in the THREAD_WAIT_CPU state.