[PATCH v10 02/11] arm64: Make perf_callchain_kernel() use arch_stack_walk()
Mark Brown
broonie at kernel.org
Wed Oct 20 07:59:37 PDT 2021
On Thu, Oct 14, 2021 at 09:58:38PM -0500, madvenka at linux.microsoft.com wrote:
> From: "Madhavan T. Venkataraman" <madvenka at linux.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 at kernel.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211020/8d46fb9a/attachment.sig>
More information about the linux-arm-kernel
mailing list