lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Feb 2015 11:53:51 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Gilad Broner <gbroner@...eaurora.org>
Cc:	James.Bottomley@...senPartnership.com,
	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, santoshsy@...il.com,
	linux-scsi-owner@...r.kernel.org, subhashj@...eaurora.org,
	ygardi@...eaurora.org, draviv@...eaurora.org,
	Lee Susman <lsusman@...eaurora.org>,
	Sujit Reddy Thumma <sthumma@...eaurora.org>,
	Vinayak Holikatti <vinholikatti@...il.com>,
	"James E.J. Bottomley" <JBottomley@...allels.com>,
	Ingo Molnar <mingo@...hat.com>,
	Oleg Nesterov <oleg@...hat.com>, Petr Mladek <pmladek@...e.cz>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Subject: Re: [PATCH v1 3/4] scsi: ufs: add trace events and dump prints for
 debug

On Tue,  3 Feb 2015 17:37:19 +0200
Gilad Broner <gbroner@...eaurora.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@...eaurora.org>
> Signed-off-by: Subhash Jadavani <subhashj@...eaurora.org>
> Signed-off-by: Lee Susman <lsusman@...eaurora.org>
> Signed-off-by: Sujit Reddy Thumma <sthumma@...eaurora.org>
> Signed-off-by: Yaniv Gardi <ygardi@...eaurora.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ