[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f528a0d2-3fc5-771d-4249-cc1a9685d4ae@linux.microsoft.com>
Date: Thu, 21 Oct 2021 07:28:46 -0500
From: "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>
To: Mark Brown <broonie@...nel.org>
Cc: mark.rutland@....com, jpoimboe@...hat.com, ardb@...nel.org,
nobuta.keiya@...itsu.com, sjitindarsingh@...il.com,
catalin.marinas@....com, will@...nel.org, jmorris@...ei.org,
linux-arm-kernel@...ts.infradead.org,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 02/11] arm64: Make perf_callchain_kernel() use
arch_stack_walk()
On 10/20/21 9:59 AM, Mark Brown wrote:
> On Thu, Oct 14, 2021 at 09:58:38PM -0500, madvenka@...ux.microsoft.com wrote:
>> From: "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>
>>
>> Currently, perf_callchain_kernel() in ARM64 code walks the stack using
>> start_backtrace() and walk_stackframe(). Make it use arch_stack_walk()
>> instead. This makes maintenance easier.
>
>> static bool callchain_trace(void *data, unsigned long pc)
>> {
>> struct perf_callchain_entry_ctx *entry = data;
>> - perf_callchain_store(entry, pc);
>> - return true;
>> + return perf_callchain_store(entry, pc) == 0;
>> }
>
> This changes us from unconditionally doing the whole walk to returning
> an error if perf_callchain_store() returns an error so it's not quite a
> straight transform, though since that seems like a useful improvement
> which most likely on't have any practical impact that's fine.
>
> Reviewed-by: Mark Brown <broonie@...nel.org>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Thanks.
Madhavan
Powered by blists - more mailing lists