[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 8 Aug 2018 19:59:30 +0530
From: Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>
To: Will Deacon <will.deacon@....com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Vivek Gautam <vivek.gautam@...eaurora.org>,
Joel Fernandes <joel@...lfernandes.org>,
Ingo Molnar <mingo@...nel.org>,
Anton Vorontsov <anton@...msg.org>,
Ingo Molnar <mingo@...hat.com>,
Sibi Sankar <sibis@...eaurora.org>,
Laura Abbott <labbott@...hat.com>,
Kees Cook <keescook@...omium.org>,
Arnd Bergmann <arnd@...db.de>, linux-arm-msm@...r.kernel.org,
Steven Rostedt <rostedt@...dmis.org>,
Jason Baron <jbaron@...mai.com>,
Tom Zanussi <tom.zanussi@...ux.intel.com>,
linux-arm-kernel@...ts.infradead.org,
Tony Luck <tony.luck@...el.com>,
Rajendra Nayak <rnayak@...eaurora.org>,
Jim Cromie <jim.cromie@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Colin Cross <ccross@...roid.com>, Joe Perches <joe@...ches.com>
Subject: Re: [RFC PATCH 3/3] dynamic_debug: Add support for dynamic register
trace
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@...eaurora.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
Powered by blists - more mailing lists