public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<linux-arch@vger.kernel.org>, <quic_satyap@quicinc.com>
Subject: Re: [PATCH] asm-generic/io: Add _RET_IP_ to MMIO trace for more accurate debug info
Date: Mon, 24 Oct 2022 12:09:29 -0400	[thread overview]
Message-ID: <20221024120929.41241e07@gandalf.local.home> (raw)
In-Reply-To: <20221017143450.9161-1-quic_saipraka@quicinc.com>

On Mon, 17 Oct 2022 20:04:50 +0530
Sai Prakash Ranjan <quic_saipraka@quicinc.com> wrote:

> Due to compiler optimizations like inlining, there are cases where
> MMIO traces using _THIS_IP_ for caller information might not be
> sufficient to provide accurate debug traces.
> 
> 1) With optimizations (Seen with GCC):
> 
> In this case, _THIS_IP_ works fine and prints the caller information
> since it will be inlined into the caller and we get the debug traces
> on who made the MMIO access, for ex:
> 
> rwmmio_read: qcom_smmu_tlb_sync+0xe0/0x1b0 width=32 addr=0xffff8000087447f4
> rwmmio_post_read: qcom_smmu_tlb_sync+0xe0/0x1b0 width=32 val=0x0 addr=0xffff8000087447f4
> 
> 2) Without optimizations (Seen with Clang):
> 
> _THIS_IP_ will not be sufficient in this case as it will print only
> the MMIO accessors itself which is of not much use since it is not
> inlined as below for example:
> 
> rwmmio_read: readl+0x4/0x80 width=32 addr=0xffff8000087447f4
> rwmmio_post_read: readl+0x48/0x80 width=32 val=0x4 addr=0xffff8000087447f4
> 
> So in order to handle this second case as well irrespective of the compiler
> optimizations, add _RET_IP_ to MMIO trace to make it provide more accurate
> debug information in all these scenarios.
> 
> Before:
> 
> rwmmio_read: readl+0x4/0x80 width=32 addr=0xffff8000087447f4
> rwmmio_post_read: readl+0x48/0x80 width=32 val=0x4 addr=0xffff8000087447f4
> 
> After:
> 
> rwmmio_read: qcom_smmu_tlb_sync+0xe0/0x1b0 -> readl+0x4/0x80 width=32 addr=0xffff8000087447f4
> rwmmio_post_read: qcom_smmu_tlb_sync+0xe0/0x1b0 -> readl+0x4/0x80 width=32 val=0x0 addr=0xffff8000087447f4
> 
> Fixes: 210031971cdd ("asm-generic/io: Add logging support for MMIO accessors")
> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>


Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

What tree should this go through?

-- Steve

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-10-24 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 14:34 [PATCH] asm-generic/io: Add _RET_IP_ to MMIO trace for more accurate debug info Sai Prakash Ranjan
2022-10-24 16:09 ` Steven Rostedt [this message]
2022-10-26 13:47   ` Sai Prakash Ranjan
2022-11-21 15:53     ` Sai Prakash Ranjan
2022-11-21 21:03       ` Arnd Bergmann

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=20221024120929.41241e07@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=quic_saipraka@quicinc.com \
    --cc=quic_satyap@quicinc.com \
    /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