From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
Joel Fernandes <joel@joelfernandes.org>,
Ingo Molnar <mingo@kernel.org>,
Anton Vorontsov <anton@enomsg.org>,
Ingo Molnar <mingo@redhat.com>,
Sibi Sankar <sibis@codeaurora.org>,
Laura Abbott <labbott@redhat.com>,
Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-msm@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Jason Baron <jbaron@akamai.com>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
linux-arm-kernel@lists.infradead.org,
Tony Luck <tony.luck@intel.com>,
Rajendra Nayak <rnayak@codeaurora.org>,
Jim Cromie <jim.cromie@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Colin Cross <ccross@android.com>, Joe Perches <joe@perches.com>
Subject: Re: [RFC PATCH 3/3] dynamic_debug: Add support for dynamic register trace
Date: Wed, 8 Aug 2018 19:59:30 +0530 [thread overview]
Message-ID: <eb55098d-6825-ab50-e1e9-0d95b1e1ea14@codeaurora.org> (raw)
In-Reply-To: <20180807165713.GJ21809@arm.com>
On 8/7/2018 10:27 PM, Will Deacon wrote:
> On Fri, Aug 03, 2018 at 07:58:44PM +0530, Sai Prakash Ranjan wrote:
>> Introduce dynamic debug filtering mechanism to register
>> tracing as dynamic_rtb() which will reduce a lot of
>> overhead otherwise of tracing all the register reads/writes
>> in all files.
>>
>> Now we can just specify the file name or any wildcard pattern
>> as any other dynamic debug facility in bootargs and dynamic rtb
>> will just trace them and the output can be seen in pstore.
>>
>> TODO: Now we use same 'p' flag but will add a separate flag for register trace
>> later.
>>
>> Example for tracing all register reads/writes in drivers/soc/qcom/* below:
>>
>> # dyndbg="file drivers/soc/qcom/* +p" in bootargs
>> # reboot -f
>> # mount -t pstore pstore /sys/fs/pstore
>> # cat /sys/fs/pstore/rtb-ramoops-0
>> [LOGK_WRITEL ] ts:1373030419 data:ffff00000d5065a4 <ffff00000867cb44> qcom_smsm_probe+0x51c/0x668
>> [LOGK_WRITEL ] ts:1373360576 data:ffff00000d506608 <ffff00000867cb44> qcom_smsm_probe+0x51c/0x668
>>
>> Also we add uncached_logk api to readl/writel definitions for arm64
>> as of now. This can be extended to arm as well later for tracing.
>>
>> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>> ---
>> arch/arm64/include/asm/io.h | 93 +++++++++++++++++++++++++++++++++++
>
> Putting all of this in the arch code, which basically duplicates everything,
> feels very wrong to me. Perhaps take a look at the ongoing work for
> instrumenting the atomics and take some inspiration from there?
>
> Ideally, the architecture just needs to provide the low-level primivites
> (which it already does) and the core can generate instruments versions if
> required.
>
Hi Will,
Thanks for the review. Will look at instrumented atomics implementation
and get back. Let me know if anything else can be improved.
- Sai Prakash
prev parent reply other threads:[~2018-08-08 14:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 14:28 [RFC PATCH 0/3] Register read/write tracing with dynamic debug and pstore Sai Prakash Ranjan
2018-08-03 14:28 ` [RFC PATCH 1/3] tracing: Add support for logging data to uncached buffer Sai Prakash Ranjan
2018-08-16 2:59 ` Steven Rostedt
2018-08-16 8:35 ` Sai Prakash Ranjan
2018-08-03 14:28 ` [RFC PATCH 2/3] pstore: Add register readl/writel tracing support Sai Prakash Ranjan
2018-08-03 14:28 ` [RFC PATCH 3/3] dynamic_debug: Add support for dynamic register trace Sai Prakash Ranjan
2018-08-07 16:57 ` Will Deacon
2018-08-08 14:29 ` Sai Prakash Ranjan [this message]
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=eb55098d-6825-ab50-e1e9-0d95b1e1ea14@codeaurora.org \
--to=saiprakash.ranjan@codeaurora.org \
--cc=anton@enomsg.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=ccross@android.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbaron@akamai.com \
--cc=jim.cromie@gmail.com \
--cc=joe@perches.com \
--cc=joel@joelfernandes.org \
--cc=keescook@chromium.org \
--cc=labbott@redhat.com \
--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=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=rnayak@codeaurora.org \
--cc=rostedt@goodmis.org \
--cc=sibis@codeaurora.org \
--cc=tom.zanussi@linux.intel.com \
--cc=tony.luck@intel.com \
--cc=vivek.gautam@codeaurora.org \
--cc=will.deacon@arm.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