All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Minchan Kim <minchan@kernel.org>, David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH 1/3] perf sched timehist: Account thread wait time separately
Date: Tue, 17 Jan 2017 11:39:06 -0300	[thread overview]
Message-ID: <20170117143906.GD14872@kernel.org> (raw)
In-Reply-To: <20170113104523.31212-1-namhyung@kernel.org>

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

  parent reply	other threads:[~2017-01-17 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 10:45 [PATCH 1/3] perf sched timehist: Account thread wait time separately Namhyung Kim
2017-01-13 10:45 ` [PATCH 2/3] perf sched timehist: Add --state option Namhyung Kim
2017-01-18  9:24   ` [tip:perf/core] " tip-bot for Namhyung Kim
2017-01-13 10:45 ` [PATCH 3/3] perf sched timehist: Show total wait times for summary Namhyung Kim
2017-01-18  9:24   ` [tip:perf/core] " tip-bot for Namhyung Kim
2017-01-13 19:35 ` [PATCH 1/3] perf sched timehist: Account thread wait time separately Arnaldo Carvalho de Melo
2017-01-17 14:39 ` Arnaldo Carvalho de Melo [this message]
2017-01-18  9:23 ` [tip:perf/core] " tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170117143906.GD14872@kernel.org \
    --to=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.