public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mike Turquette <mturquette@linaro.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: Add tracepoints for hardware operations
Date: Mon, 02 Feb 2015 11:41:40 -0800	[thread overview]
Message-ID: <54CFD2F4.3090800@codeaurora.org> (raw)
In-Reply-To: <20150202110033.6462d4f4@gandalf.local.home>

On 02/02/15 08:00, Steven Rostedt wrote:
> On Fri, 30 Jan 2015 16:16:11 -0800
> Stephen Boyd <sboyd@codeaurora.org> wrote:
>
>> It's useful to have tracepoints around operations that change the
>> hardware state so that we can debug clock hardware performance
>> and operations. Four basic types of events are supported: on/off
>> events for enable, disable, prepare, unprepare that only record
>> an event and a clock name, rate changing events for
>> clk_set_{min_,max_}rate{_range}(), phase changing events for
>> clk_set_phase() and parent changing events for clk_set_parent().
>>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
> I don't see anything wrong with the implementation of the tracepoints.
> Now whether or not they are useful is up to the clk maintainer to
> decide.
>
>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>> ---
>>  drivers/clk/clk.c          |  32 ++++++++
>>  include/trace/events/clk.h | 198 +++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 230 insertions(+)
>>  create mode 100644 include/trace/events/clk.h
>>
>
>   
>>  unlock_out:
>> @@ -861,9 +868,12 @@ static void clk_core_unprepare(struct clk_core *clk)
>>  
>>  	WARN_ON(clk->enable_count > 0);
>>  
>> +	trace_clk_unprepare(clk);
>> +
>>  	if (clk->ops->unprepare)
>>  		clk->ops->unprepare(clk->hw);
>>  
>> +	trace_clk_unprepare_complete(clk);
>>  	clk_core_unprepare(clk->parent);
> I guess you do not care about the clk_core_unprepare time.

Function trace will handle that?

>
>>  }
>>  
>> @@ -901,6 +911,8 @@ static int clk_core_prepare(struct clk_core *clk)
>>  		if (ret)
>>  			return ret;
>>  
>> +		trace_clk_prepare(clk);
>> +
>>  		if (clk->ops->prepare) {
>>  			ret = clk->ops->prepare(clk->hw);
>>  			if (ret) {
>> @@ -908,6 +920,8 @@ static int clk_core_prepare(struct clk_core *clk)
>>  				return ret;
>>  			}
>>  		}
>> +
>> +		trace_clk_prepare_complete(clk);
> I'm curious to why you do not put the tracepoint within the if
> statement, and only show the tracepoints if the clock prepare is
> actually called. Also, if you exit out with that return, will you tools
> be OK with seeing the clk_prepare but not the clk_prepare_complete?
>

Ah good point. I'll rework it so we always get the tracepoint around the
clk op.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


  parent reply	other threads:[~2015-02-02 19:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31  0:16 [PATCH] clk: Add tracepoints for hardware operations Stephen Boyd
2015-02-02 16:00 ` Steven Rostedt
2015-02-02 19:05   ` Mike Turquette
2015-02-02 19:41   ` Stephen Boyd [this message]
2015-02-02 20:00     ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2014-06-30 23:56 Stephen Boyd
2014-07-01  0:52 ` Steven Rostedt
2014-07-01  1:07   ` Stephen Boyd
2014-07-01  1:11     ` Steven Rostedt
2014-07-02  3:44     ` Mike Turquette

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=54CFD2F4.3090800@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --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