-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arch: stack trace Kconfig & dependencies cleanup #73288
arch: stack trace Kconfig & dependencies cleanup #73288
Conversation
c9da9ce
to
8e25c72
Compare
8e25c72
to
9168c66
Compare
9168c66
to
d9f017a
Compare
Hm... I think you can keep the arch specific kconfig without renaming them, or remove the arch specific ones entirely. Also, might be a good idea to add a |
Sounds like you kinda prefer #72863? But,
Maybe a top-down approach?
|
Moved back to draft for now, opened #73376 specifically for the cleanup |
I think that would be a better approach. A developer wants to enable such feature, so any dependencies should be pulled in. Or else one has to do dependency hunting through kconfig. |
a278c27
to
b63973b
Compare
There are some dependencies that can't be simply selected without getting more involved, like |
b63973b
to
e13d3c3
Compare
The `PRINTK` was required for `EXCEPTION_STACK_TRACE` because it's initial implementation for x86 in zephyrproject-rtos#6653 uses `printk()`. We are using `LOG_ERR()` now, so this is not required anymore. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The `DEBUG_INFO` in the `EXCEPTION_STACK_TRACE` is only required by x86. Move that to `X86_EXCEPTION_STACK_TRACE` instead. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Not all stack trace implementation requires frame pointer, move that dependency to architecture Kconfig. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Select `DEBUG_INFO` instead of depending on it. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Currently, the stack trace in ARM64 implementation depends on frame pointer Kconfigs combo to be enabled. Create a dedicated Kconfig for that instead, so that it is consistent with x86 and riscv, and update the source accordingly. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Fix the dependencies of `CONFIG_EXCEPTION_STACK_TRACE`: - Architecture-specific Kconfig, i.e. `X86_EXCEPTION_STACK_TRACE`, will be enabled automatically when all the dependencies are met. - `EXCEPTION_STACK_TRACE` depends on architecture-specific Kconfig to be enabled. - The stack trace implementations should be compiled only if user enables `CONFIG_EXCEPTION_STACK_TRACE`. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
e13d3c3
to
fbe2021
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still +1
Overview
CONFIG_ARM64_EXCEPTION_STACK_TRACE
that depends onCONFIG_ARM64_ENABLE_FRAME_POINTER
CONFIG_EXCEPTION_STACK_TRACE
toCONFIG_X86_EXCEPTION_STACK_TRACE
CONFIG_EXCEPTION_STACK_TRACE
now depends on architecture-specificEXCEPTION_STACK_TRACE
Kconfig to be enabledCONFIG_EXCEPTION_STACK_TRACE
Current
RISC-V / X86
ARM64
This PR (all supported archs)