[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbu8M84s2rPsKTwMmMXeeYEmNVaXFnp1hsKM0Dc9jzNfw@mail.gmail.com>
Date: Wed, 27 Jul 2022 09:25:18 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Li Huafei <lihuafei1@...wei.com>
Cc: linux@...linux.org.uk, rmk+kernel@...linux.org.uk, ardb@...nel.org,
will@...nel.org, broonie@...nel.org, mark.rutland@....com,
peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
namhyung@...nel.org, arnd@...db.de, rostedt@...dmis.org,
nick.hawkins@....com, john@...ozen.org, mhiramat@...nel.org,
ast@...nel.org, linyujun809@...wei.com, ndesaulniers@...gle.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v3 4/4] ARM: stacktrace: Convert stacktrace to generic ARCH_STACKWALK
On Wed, Jul 27, 2022 at 6:03 AM Li Huafei <lihuafei1@...wei.com> wrote:
> Historically architectures have had duplicated code in their stack trace
> implementations for filtering what gets traced. In order to avoid this
> duplication some generic code has been provided using a new interface
> arch_stack_walk(), enabled by selecting ARCH_STACKWALK in Kconfig, which
> factors all this out into the generic stack trace code. Convert ARM to
> use this common infrastructure.
>
> When initializing the stack frame of the current task, arm64 uses
> __builtin_frame_address(1) to initialize the frame pointer, skipping
> arch_stack_walk(), see the commit c607ab4f916d ("arm64: stacktrace:
> don't trace arch_ stack_walk()"). Since __builtin_frame_address(1) does
> not work on ARM, unwind_frame() is used to unwind the stack one layer
> forward before calling walk_stackframe().
>
> Signed-off-by: Li Huafei <lihuafei1@...wei.com>
Looks good to me.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists