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


Groups > linux.kernel > #1246600 > unrolled thread

Re: [PATCH v6 4/5] devfreq_cooling: add trace information

Started byJavi Merino <javi.merino@arm.com>
First post2015-10-14 14:00 +0200
Last post2015-10-14 15:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v6 4/5] devfreq_cooling: add trace information Javi Merino <javi.merino@arm.com> - 2015-10-14 14:00 +0200
    Re: [PATCH v6 4/5] devfreq_cooling: add trace information Steven Rostedt <rostedt@goodmis.org> - 2015-10-14 15:30 +0200

#1246600 — Re: [PATCH v6 4/5] devfreq_cooling: add trace information

FromJavi Merino <javi.merino@arm.com>
Date2015-10-14 14:00 +0200
SubjectRe: [PATCH v6 4/5] devfreq_cooling: add trace information
Message-ID<qjsSS-5ZS-21@gated-at.bofh.it>
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1246738

FromSteven Rostedt <rostedt@goodmis.org>
Date2015-10-14 15:30 +0200
Message-ID<qjuhY-8cu-19@gated-at.bofh.it>
In reply to#1246600
On Wed, 14 Oct 2015 12:53:30 +0100
Javi Merino <javi.merino@arm.com> wrote:

> > The rest looks fine to me.
> 
> Can I treat that last statement as an Acked-by?

Sure, why not ;-)

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web