-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Enable non-leaf Frame Pointers for Arm64 Windows #140828
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
Conversation
These commits modify compiler targets. |
needs rebase |
"Ugh, who else has been messing with this target?" |
Thanks! This is consistent with other decisions we've made for other AArch64 targets that recommend/require using frame pointers, see:
...and it obviously is what the docs want. There is an open question about how this interacts with CLI options that those PRs accidentally raised, but it will remain an open question regardless of what is done here. So, I'm just going to r+ this. @bors r+ rollup |
Would it be worth enabling this for Arm64 by default? Guessing that would need an MCP to discuss... |
Probably? Less clear to me that we need an MCP, but maybe. We don't really have "architectural defaults" in our current structure for the code. I've opened #140832 to address this for Linux platforms at least. |
Enable non-leaf Frame Pointers for Arm64 Windows Microsoft recommends enabling frame pointers for Arm64 Windows as it enables fast stack walking, from <https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers>: > The frame pointer (x29) is required for compatibility with fast stack walking used by ETW and other services. It must point to the previous {x29, x30} pair on the stack. I'm setting this to "non-leaf" as leaf functions shouldn't be spilling registers and so won't touch the frame pointer.
Enable non-leaf Frame Pointers for Arm64 Windows Microsoft recommends enabling frame pointers for Arm64 Windows as it enables fast stack walking, from <https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers>: > The frame pointer (x29) is required for compatibility with fast stack walking used by ETW and other services. It must point to the previous {x29, x30} pair on the stack. I'm setting this to "non-leaf" as leaf functions shouldn't be spilling registers and so won't touch the frame pointer.
Rollup of 5 pull requests Successful merges: - rust-lang#140801 (Use span before macro expansion in lint for-loops-over-falibles) - rust-lang#140804 (add signed ints to unn- transmutes to ensure feature parity) - rust-lang#140812 (Fix `tests/rustdoc-json` triagebot message path) - rust-lang#140817 (bootstrap: more consistent use of `...` when citing configuration snippets) - rust-lang#140828 (Enable non-leaf Frame Pointers for Arm64 Windows) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 5 pull requests Successful merges: - rust-lang#140801 (Use span before macro expansion in lint for-loops-over-falibles) - rust-lang#140804 (add signed ints to unn- transmutes to ensure feature parity) - rust-lang#140812 (Fix `tests/rustdoc-json` triagebot message path) - rust-lang#140817 (bootstrap: more consistent use of `...` when citing configuration snippets) - rust-lang#140828 (Enable non-leaf Frame Pointers for Arm64 Windows) r? `@ghost` `@rustbot` modify labels: rollup --- try-job: test-various
Rollup of 5 pull requests Successful merges: - rust-lang#140801 (Use span before macro expansion in lint for-loops-over-falibles) - rust-lang#140804 (add signed ints to unn- transmutes to ensure feature parity) - rust-lang#140812 (Fix `tests/rustdoc-json` triagebot message path) - rust-lang#140817 (bootstrap: more consistent use of `...` when citing configuration snippets) - rust-lang#140828 (Enable non-leaf Frame Pointers for Arm64 Windows) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#140828 - dpaoliello:arm64fp, r=workingjubilee Enable non-leaf Frame Pointers for Arm64 Windows Microsoft recommends enabling frame pointers for Arm64 Windows as it enables fast stack walking, from <https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers>: > The frame pointer (x29) is required for compatibility with fast stack walking used by ETW and other services. It must point to the previous {x29, x30} pair on the stack. I'm setting this to "non-leaf" as leaf functions shouldn't be spilling registers and so won't touch the frame pointer.
Microsoft recommends enabling frame pointers for Arm64 Windows as it enables fast stack walking, from https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers:
I'm setting this to "non-leaf" as leaf functions shouldn't be spilling registers and so won't touch the frame pointer.