Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451417

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

From David Ahern <dsahern@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] perf sched: fix wrong conversion of task state
Date 2016-07-27 19:00 +0200
Message-ID <rZAlA-1Uf-15@gated-at.bofh.it> (permalink)
References <rZzIS-1FV-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

you reference fixing the order of XZ as well.

>
> Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> ---
>  tools/perf/builtin-sched.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 0dfe8df..8651c36 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -70,7 +70,8 @@ struct sched_atom {
>  	struct task_desc	*wakee;
>  };
>
> -#define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP"
> +/* TASK_STATE_MAX means the task is preempted(R+). Use '+' for it here. */
> +#define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWPN+"

As I mentioned in a previous reply you can't add the '+' on the end.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] perf sched: fix wrong conversion of task state Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com> - 2016-07-27 18:20 +0200
  Re: [PATCH v2] perf sched: fix wrong conversion of task state David Ahern <dsahern@gmail.com> - 2016-07-27 19:00 +0200
  Re: [PATCH v2] perf sched: fix wrong conversion of task state Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-28 01:50 +0200
    RE: [PATCH v2] perf sched: fix wrong conversion of task state "Tomoki Sekiyama" <tomoki.sekiyama.qu@hitachi.com> - 2016-07-29 06:10 +0200

csiph-web