linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Gilad Broner <gbroner@codeaurora.org>
Cc: James.Bottomley@HansenPartnership.com,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, santoshsy@gmail.com,
	linux-scsi-owner@vger.kernel.org, subhashj@codeaurora.org,
	ygardi@codeaurora.org, draviv@codeaurora.org,
	Lee Susman <lsusman@codeaurora.org>,
	Sujit Reddy Thumma <sthumma@codeaurora.org>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	Ingo Molnar <mingo@redhat.com>, Oleg Nesterov <oleg@redhat.com>,
	Petr Mladek <pmladek@suse.cz>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Vaibhav Nagarnaik <vnagarnaik@google.com>
Subject: Re: [PATCH v1 3/4] scsi: ufs: add trace events and dump prints for debug
Date: Tue, 3 Feb 2015 11:53:51 -0500	[thread overview]
Message-ID: <20150203115351.58994f7d@gandalf.local.home> (raw)
In-Reply-To: <1422977841-25036-4-git-send-email-gbroner@codeaurora.org>

On Tue,  3 Feb 2015 17:37:19 +0200
Gilad Broner <gbroner@codeaurora.org> wrote:

> Add trace events to driver to allow monitoring and profilig
> of activities such as PM suspend/resume, hibernate enter/exit,
> clock gating and clock scaling up/down.
> In addition, add UFS host controller register dumps to provide
> detailed information in case of errors to assist in analysis
> of issues.
> 
> Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
> Signed-off-by: Lee Susman <lsusman@codeaurora.org>
> Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
> ---
>  drivers/scsi/ufs/ufs-qcom.c  |  53 +++++
>  drivers/scsi/ufs/ufshcd.c    | 509 ++++++++++++++++++++++++++++++++++++++++---
>  drivers/scsi/ufs/ufshcd.h    |  49 ++++-
>  drivers/scsi/ufs/ufshci.h    |   1 +
>  include/linux/ftrace_event.h |   3 +
>  include/trace/events/ufs.h   | 227 +++++++++++++++++++



> +static inline void ufshcd_cond_add_cmd_trace(struct ufs_hba *hba,
> +					unsigned int tag, const char *str)
> +{
> +	if (FTRACE_EVENT_ENABLED(ufshcd_command))

What's this? Not mentioned at all in the change log.

> +		ufshcd_add_command_trace(hba, tag, str);
> +}
> +#else



> diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
> index 0bebb5c..54a4a63 100644
> --- a/include/linux/ftrace_event.h
> +++ b/include/linux/ftrace_event.h
> @@ -606,4 +606,7 @@ perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr,
>  }
>  #endif
>  
> +#define FTRACE_EVENT_ENABLED(name)					\
> +	((event_##name).flags & (1 << (TRACE_EVENT_FL_WAS_ENABLED_BIT)))\
> +
>  #endif /* _LINUX_FTRACE_EVENT_H */

NACK!

Please use trace_<event>_enabled(), for instance,
trace_ufshcd_command_enabled().

This also uses jump_labels and is a nop when it is not enabled.

-- Steve


  reply	other threads:[~2015-02-03 16:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 15:37 [PATCH v1 0/4] Add ioctl and debug utilities to UFS driver Gilad Broner
2015-02-03 15:37 ` [PATCH v1 1/4] scsi: ufs: add ioctl interface for query request Gilad Broner
2015-02-03 15:37 ` [PATCH v1 2/4] scsi: ufs: add debugfs for ufs Gilad Broner
2015-02-06 14:42   ` Akinobu Mita
2015-02-10 14:05     ` Gilad Broner
2015-02-03 15:37 ` [PATCH v1 3/4] scsi: ufs: add trace events and dump prints for debug Gilad Broner
2015-02-03 16:53   ` Steven Rostedt [this message]
2015-02-04 14:00     ` Gilad Broner
2015-02-03 15:37 ` [PATCH v1 4/4] scsi: ufs: inject errors to verify error handling Gilad Broner

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=20150203115351.58994f7d@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=JBottomley@parallels.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=draviv@codeaurora.org \
    --cc=gbroner@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lsusman@codeaurora.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=pmladek@suse.cz \
    --cc=santoshsy@gmail.com \
    --cc=sthumma@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    --cc=vnagarnaik@google.com \
    --cc=ygardi@codeaurora.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;
as well as URLs for NNTP newsgroup(s).