mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Arjan van de Ven" <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, rostedt@goodmis.org
Subject: Re: [PATCH] ftrace: Add a C/P state tracer to help power optimization
Date: Tue, 25 Nov 2008 12:25:51 +0100	[thread overview]
Message-ID: <c62985530811250325h63ba1a08j610eb0be5ed73a45@mail.gmail.com> (raw)
In-Reply-To: <20081123164958.21fae966@infradead.org>

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?

  reply	other threads:[~2008-11-25 11:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-23 20:59 Arjan van de Ven
2008-11-23 21:12 ` Frédéric Weisbecker
2008-11-24  0:49   ` Arjan van de Ven
2008-11-25 11:25     ` Frédéric Weisbecker [this message]
2008-11-26  7:35       ` Ingo Molnar

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=c62985530811250325h63ba1a08j610eb0be5ed73a45@mail.gmail.com \
    --to=fweisbec@gmail.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®