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

2016-07-28 Thread 関山友輝 / SEKIYAMA,TOMOKI
On 2016/07/28 23:26、David Ahern 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

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

2016-07-28 Thread 関山友輝 / SEKIYAMA,TOMOKI
On 2016/07/28 23:26、David Ahern 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

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

2016-07-28 Thread David Ahern
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

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

2016-07-28 Thread David Ahern
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

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

2016-07-27 Thread Tomoki Sekiyama
On 2016/7/28 1:50, David Ahern wrote: diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 0dfe8df..eb2f7f4 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -71,6 +71,7 @@ struct sched_atom { }; #define

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

2016-07-27 Thread Tomoki Sekiyama
On 2016/7/28 1:50, David Ahern wrote: diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 0dfe8df..eb2f7f4 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -71,6 +71,7 @@ struct sched_atom { }; #define

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

2016-07-27 Thread David Ahern
On 7/27/16 9:58 AM, 関山友輝 / SEKIYAMA,TOMOKI wrote: diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 0dfe8df..eb2f7f4 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -71,6 +71,7 @@ struct sched_atom { }; #define TASK_STATE_TO_CHAR_STR

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

2016-07-27 Thread David Ahern
On 7/27/16 9:58 AM, 関山友輝 / SEKIYAMA,TOMOKI wrote: diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 0dfe8df..eb2f7f4 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -71,6 +71,7 @@ struct sched_atom { }; #define TASK_STATE_TO_CHAR_STR

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

2016-07-27 Thread 関山友輝 / SEKIYAMA,TOMOKI
Also 'X' and 'Z' in TASK_STATE_TO_CHAR_STR need to be swapped: https://patchwork.kernel.org/patch/4218021/ -Original Message- Hi David, Thank you for the review. On 2016/7/27 23:18, David Ahern wrote: > On 7/27/16 6:54 AM, Tomoki Sekiyama wrote: >> sched_out_state() converts the

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

2016-07-27 Thread 関山友輝 / SEKIYAMA,TOMOKI
Also 'X' and 'Z' in TASK_STATE_TO_CHAR_STR need to be swapped: https://patchwork.kernel.org/patch/4218021/ -Original Message- Hi David, Thank you for the review. On 2016/7/27 23:18, David Ahern wrote: > On 7/27/16 6:54 AM, Tomoki Sekiyama wrote: >> sched_out_state() converts the

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

2016-07-27 Thread 関山友輝 / SEKIYAMA,TOMOKI
Hi David, Thank you for the review. On 2016/7/27 23:18, David Ahern wrote: > On 7/27/16 6:54 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.

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

2016-07-27 Thread 関山友輝 / SEKIYAMA,TOMOKI
Hi David, Thank you for the review. On 2016/7/27 23:18, David Ahern wrote: > On 7/27/16 6:54 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.

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

2016-07-27 Thread David Ahern
On 7/27/16 6:54 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. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa

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

2016-07-27 Thread David Ahern
On 7/27/16 6:54 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. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim

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

2016-07-27 Thread Tomoki Sekiyama
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. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern

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

2016-07-27 Thread Tomoki Sekiyama
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. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu ---

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

2016-07-27 Thread Tomoki Sekiyama
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. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern

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

2016-07-27 Thread Tomoki Sekiyama
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. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu ---