From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Sandeep Tripathy <sandeep.tripathy@linaro.org>, rjw@rjwysocki.net
Cc: rostedt@goodmis.org, linux-pm@vger.kernel.org,
linaro-kernel@lists.linaro.org, patches@linaro.org
Subject: Re: [PATCH] cpuidle/idle: move idle traces to cpuidle_enter_state
Date: Sat, 05 Jul 2014 17:45:24 +0200 [thread overview]
Message-ID: <53B81D94.6000404@linaro.org> (raw)
In-Reply-To: <1404293458-9799-1-git-send-email-sandeep.tripathy@linaro.org>
On 07/02/2014 11:30 AM, Sandeep Tripathy wrote:
> idle_exit event is the first event after a core exits
> idle state. So this should be traced before local irq
> is ebabled. Likewise idle_entry is the last event before
> a core enters idle state. This will ease visualising the
> cpu idle state from kernel traces.
>
> Signed-off-by: Sandeep Tripathy <sandeep.tripathy@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/cpuidle/cpuidle.c | 3 +++
> kernel/sched/idle.c | 4 ----
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 8236746..97680d0 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -99,12 +99,15 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
> ktime_t time_start, time_end;
> s64 diff;
>
> + trace_cpu_idle_rcuidle(index, dev->cpu);
> time_start = ktime_get();
>
> entered_state = target_state->enter(dev, drv, index);
>
> time_end = ktime_get();
>
> + trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
> +
> if (!cpuidle_state_is_coupled(dev, drv, entered_state))
> local_irq_enable();
>
> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> index 8f4390a..07c446a 100644
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -141,7 +141,6 @@ static int cpuidle_idle_call(void)
> &dev->cpu);
>
> if (!ret) {
> - trace_cpu_idle_rcuidle(next_state, dev->cpu);
>
> /*
> * Enter the idle state previously
> @@ -154,9 +153,6 @@ static int cpuidle_idle_call(void)
> entered_state = cpuidle_enter(drv, dev,
> next_state);
>
> - trace_cpu_idle_rcuidle(PWR_EVENT_EXIT,
> - dev->cpu);
> -
> if (broadcast)
> clockevents_notify(
> CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2014-07-05 15:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 9:30 [PATCH] cpuidle/idle: move idle traces to cpuidle_enter_state Sandeep Tripathy
2014-07-05 15:45 ` Daniel Lezcano [this message]
2014-07-14 19:47 ` Rafael J. Wysocki
2014-07-14 20:07 ` Peter Zijlstra
2014-07-14 21:00 ` Steven Rostedt
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=53B81D94.6000404@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rjw@rjwysocki.net \
--cc=rostedt@goodmis.org \
--cc=sandeep.tripathy@linaro.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.