lkml.org 
[lkml]   [2008]   [Nov]   [25]   [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
That looks good...

2008/11/24 Arjan van de Ven <arjan@infradead.org>:
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 7854d87..0df2886 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -311,6 +311,35 @@ ftrace_init_module(struct module *mod,
> unsigned long *start, unsigned long *end) { }
> #endif
>
> +enum {
> + POWER_NONE = 0,
> + POWER_CSTATE = 1,
> + POWER_PSTATE = 2,
> +};
> +
> +struct power_trace {
> +#ifdef CONFIG_POWER_TRACER
> + ktime_t stamp;
> + ktime_t end;
> + int type;
> + int state;
> +#endif
> +};
> +
> +#ifdef CONFIG_POWER_TRACER
> +extern void trace_power_start(struct power_trace *it, unsigned int type,
> + unsigned int state);
> +extern void trace_power_mark(struct power_trace *it, unsigned int type,
> + unsigned int state);
> +extern void trace_power_end(struct power_trace *it);
> +#else
> +static inline void trace_power_start(struct power_trace *it, unsigned int type,
> + unsigned int state) { }
> +static inline void trace_power_mark(struct power_trace *it, unsigned int type,
> + unsigned int state) { }
> +static inline void trace_power_end(struct power_trace *it) { }
> +#endif
> +


Sorry I didn't see it on my last mail.
But these headers seem to relate more on "power tracing" rather than "ftrace".
Perhaps these would find a better place on trace/power.h
I guess that could be done on a delta patch as well....


Just for curiosity, do you have an example of trace and/or graph from
this tracer?


\
 
 \ /
  Last update: 2008-11-25 12:29    [W:0.298 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site