lkml.org 
[lkml]   [2008]   [Oct]   [27]   [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

On Mon, 27 Oct 2008, Frank Ch. Eigler 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?

Yeah, this should be converted to a trace_point. See include/trace/sched.h
for examples.

The users are in kernel/sched.c. Just add "trace_" in front of the names
to find the users. Then you can look at kernel/trace/trace_sched_switch.c
to see an example on how to hook into it.

-- Steve



\
 
 \ /
  Last update: 2008-10-27 21:17    [W:0.082 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site