lkml.org 
[lkml]   [2009]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH] ftrace: Add a C/P state tracer to help power optimization

* Jason Baron <jbaron@redhat.com> wrote:

> On Mon, Oct 27, 2008 at 02:06:30PM -0700, Arjan van de Ven wrote:
> > > Arjan van de Ven <arjan@infradead.org> writes:
> > >
> > > > [...]
> > > > --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > > > +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > > > [...]
> > > > @@ -427,6 +429,8 @@ static int acpi_cpufreq_target(struct
> > > > cpufreq_policy *policy, }
> > > > }
> > > >
> > > > + trace_power_mark(&it, POWER_PSTATE, next_perf_state);
> > > > +
> > > > switch (data->cpu_feature) {
> > > > case SYSTEM_INTEL_MSR_CAPABLE:
> > > > cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
> > > > [...]
> > >
> > > Is there some reason that this doesn't use tracepoints instead
> > > of such a single-backend hook?
> >
> > because it's a ton simpler this way? do simple things simpe and all
> > that....
> >
>
> hi,
>
> I wrote a patch to make c/p state tracer dependent on tracepoints and
> then realized that the discussion had already been had. However, the
> patch to use tracepoints is fairly simple, allows for other consumers,
> and avoids a function call in the off case. please consider.
>
> thanks,
>
> -Jason
>
> Signed-off-by: Jason Baron <jbaron@redhat.com>
>
> ---
>
> arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 3 +++
> arch/x86/kernel/process.c | 4 ++++
> include/linux/ftrace.h | 15 ---------------
> include/trace/power.h | 18 ++++++++++++++++++
> kernel/trace/trace_power.c | 28 ++++++++++++++++++++--------
> 5 files changed, 45 insertions(+), 23 deletions(-)
> create mode 100644 include/trace/power.h

Looks good, but could you please base this on latest -tip? There's a number of
pending changes in the tracing tree that conflict:

patching file arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Hunk #1 FAILED at 34.
1 out of 2 hunks FAILED -- rejects in file
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
patching file arch/x86/kernel/process.c
Hunk #1 FAILED at 9.
1 out of 2 hunks FAILED -- rejects in file arch/x86/kernel/process.c
patching file include/linux/ftrace.h
Hunk #1 FAILED at 342.
1 out of 1 hunk FAILED -- rejects in file include/linux/ftrace.h
The next patch would create the file include/trace/power.h,
which already exists! Applying it anyway.
patching file include/trace/power.h
Patch attempted to create file include/trace/power.h, which already exists.
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- rejects in file include/trace/power.h
patching file kernel/trace/trace_power.c
Hunk #1 FAILED at 14.
Hunk #2 succeeded at 111 (offset 1 line).
Hunk #4 succeeded at 148 (offset -5 lines).
Hunk #5 succeeded at 183 (offset -6 lines).
1 out of 5 hunks FAILED -- rejects in file kernel/trace/trace_power.c

See:

http://people.redhat.com/mingo/tip.git/README

Ingo


\
 
 \ /
  Last update: 2009-02-11 10:33    [from the cache]
©2003-2011 Jasper Spaans