linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Prasad Sodagudi <psodagud@codeaurora.org>
Cc: rostedt@goodmis.org, mingo@redhat.com, keescook@chromium.org,
	saiprakash.ranjan@codeaurora.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	anton@enomsg.org, arnd@arndb.de, catalin.marinas@arm.com,
	ccross@android.com, jbaron@akamai.com, jim.cromie@gmail.com,
	joe@perches.com, joel@joelfernandes.org
Subject: Re: [PATCH] tracing: Add register read and write tracing support
Date: Mon, 28 Sep 2020 07:17:48 +0200	[thread overview]
Message-ID: <20200928051748.GA767987@kroah.com> (raw)
In-Reply-To: <1601253290-400618-2-git-send-email-psodagud@codeaurora.org>

On Sun, Sep 27, 2020 at 05:34:50PM -0700, Prasad Sodagudi wrote:
> Add register read/write operations tracing support.
> ftrace events helps trace register read and write
> location details of memory mapped IO registers. Also
> add _no_log variants the writel_relaxed/readl_relaed
> APIs to avoid excessive logging for certain register
> operations.
> 
> Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
> ---
>  arch/arm64/include/asm/io.h    | 117 ++++++++++++++++++++++++++++++++++++++---
>  include/linux/iorw.h           |  20 +++++++
>  include/trace/events/rwio.h    |  51 ++++++++++++++++++
>  kernel/trace/Kconfig           |  11 ++++
>  kernel/trace/Makefile          |   1 +
>  kernel/trace/trace_readwrite.c |  30 +++++++++++
>  6 files changed, 222 insertions(+), 8 deletions(-)
>  create mode 100644 include/linux/iorw.h
>  create mode 100644 include/trace/events/rwio.h
>  create mode 100644 kernel/trace/trace_readwrite.c
> 
> diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
> index ff50dd7..db5acff 100644
> --- a/arch/arm64/include/asm/io.h
> +++ b/arch/arm64/include/asm/io.h
> @@ -9,6 +9,7 @@
>  #define __ASM_IO_H
>  
>  #include <linux/types.h>
> +#include <linux/iorw.h>
>  #include <linux/pgtable.h>
>  
>  #include <asm/byteorder.h>
> @@ -24,24 +25,28 @@
>  #define __raw_writeb __raw_writeb
>  static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
>  {
> +	log_write_io(addr);
>  	asm volatile("strb %w0, [%1]" : : "rZ" (val), "r" (addr));

You are just logging the address, what about the data written or read?
Why throw away half of the information here?

Oh, and sending patches that break the build is generally not a good
thing to do :)

thanks,

greg k-h

  reply	other threads:[~2020-09-28  5:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28  0:34 [PATCH] Register read and writes tracing Prasad Sodagudi
2020-09-28  0:34 ` [PATCH] tracing: Add register read and write tracing support Prasad Sodagudi
2020-09-28  5:17   ` Greg KH [this message]
2020-09-28  5:20   ` Greg KH
2020-09-28 14:55   ` Steven Rostedt
2020-09-28  5:45 ` [PATCH] Register read and writes tracing Sai Prakash Ranjan

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=20200928051748.GA767987@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=anton@enomsg.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=ccross@android.com \
    --cc=jbaron@akamai.com \
    --cc=jim.cromie@gmail.com \
    --cc=joe@perches.com \
    --cc=joel@joelfernandes.org \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=psodagud@codeaurora.org \
    --cc=rostedt@goodmis.org \
    --cc=saiprakash.ranjan@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).