From: Javi Merino <javi.merino@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"cw00.choi@samsung.com" <cw00.choi@samsung.com>,
"edubezval@gmail.com" <edubezval@gmail.com>,
Zhang Rui <rui.zhang@intel.com>, Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v6 4/5] devfreq_cooling: add trace information
Date: Wed, 14 Oct 2015 12:53:30 +0100 [thread overview]
Message-ID: <20151014115329.GA2998@e104805> (raw)
In-Reply-To: <20150910131928.3c88fe28@gandalf.local.home>
Hi Steve,
On Thu, Sep 10, 2015 at 06:19:28PM +0100, Steven Rostedt wrote:
> On Thu, 10 Sep 2015 18:09:31 +0100
> Javi Merino <javi.merino@arm.com> wrote:
>
> > Tracing is useful for debugging and performance tuning. Add similar
> > traces to what's present in the cpu cooling device.
> >
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: Eduardo Valentin <edubezval@gmail.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Signed-off-by: Javi Merino <javi.merino@arm.com>
> > ---
> > drivers/thermal/devfreq_cooling.c | 6 +++++
> > include/trace/events/thermal.h | 53 +++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 59 insertions(+)
> >
> > diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
> > index a032c5d5c374..a27206815066 100644
> > --- a/drivers/thermal/devfreq_cooling.c
> > +++ b/drivers/thermal/devfreq_cooling.c
> > @@ -25,6 +25,8 @@
> > #include <linux/pm_opp.h>
> > #include <linux/thermal.h>
> >
> > +#include <trace/events/thermal.h>
> > +
> > static DEFINE_MUTEX(devfreq_lock);
> > static DEFINE_IDR(devfreq_idr);
> >
> > @@ -293,6 +295,9 @@ static int devfreq_cooling_get_requested_power(struct thermal_cooling_device *cd
> > /* Get static power */
> > static_power = get_static_power(dfc, freq);
> >
> > + trace_thermal_power_devfreq_get_power(cdev, status, freq, dyn_power,
> > + static_power);
> > +
> > *power = dyn_power + static_power;
> >
> > return 0;
> > @@ -348,6 +353,7 @@ static int devfreq_cooling_power2state(struct thermal_cooling_device *cdev,
> > break;
> >
> > *state = i;
> > + trace_thermal_power_devfreq_limit(cdev, freq, *state, power);
>
> I'm curious, does changing the above to:
>
> trace_thermal_power_devfreq_limit(cdev, freq, i, power);
>
> make the compiled code better?
>
> A tracepoint does some whacky things, and gcc may not optimize this.
>
> The rest looks fine to me.
Can I treat that last statement as an Acked-by?
next prev parent reply other threads:[~2015-10-14 11:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 17:09 [PATCH v6 0/5] Devfreq cooling device Javi Merino
2015-09-10 17:09 ` [PATCH v6 1/5] PM / devfreq: cache the last call to get_dev_status() Javi Merino
2015-09-10 17:09 ` [PATCH v6 2/5] PM / OPP: get the voltage for all OPPs Javi Merino
2015-09-10 17:09 ` [PATCH v6 3/5] thermal: Add devfreq cooling Javi Merino
2015-09-10 17:09 ` [PATCH v6 4/5] devfreq_cooling: add trace information Javi Merino
2015-09-10 17:19 ` Steven Rostedt
2015-09-18 13:55 ` Javi Merino
2015-09-18 14:04 ` Steven Rostedt
2015-10-14 11:53 ` Javi Merino [this message]
2015-10-14 13:22 ` Steven Rostedt
2015-09-10 17:09 ` [PATCH v6 5/5] PM / devfreq: drop comment about thermal setting max_freq Javi Merino
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=20151014115329.GA2998@e104805 \
--to=javi.merino@arm.com \
--cc=cw00.choi@samsung.com \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=rui.zhang@intel.com \
/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.