Skip to content

Conversation

workingjubilee
Copy link
Member

It's not clear to me if Illumos requires full frame-pointers, including leaf frames, or not. I figured I'd ask the maintainers.

r? @ghost

cc @jclulow @pfmooney

@rustbot
Copy link
Collaborator

rustbot commented May 30, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 30, 2025
@apiraino
Copy link
Contributor

cc @jclulow @pfmooney do you have any feedback on this? thanks

@jclulow
Copy link
Contributor

jclulow commented Jun 26, 2025

Hey, sorry, I have been travelling!

In general we're quite fond of having proper stack frames wherever possible. It enables us to do things like sample-based profiling and get a reasonable picture of what's going on without needing to reach all the way into the DWARF.

Do you have some more detail or specifics about what impact this would have on code generation? Is there a huge performance win? What do representative profiled stacks look like before and after, etc? Or if there's some docs I could read that would help understand the mechanism and the motivation that would be good too!

@workingjubilee
Copy link
Member Author

@jclulow Hmm. My understanding of stack-based tracing is that it shouldn't have problems if the frame pointer is elided for the final function call into a leaf function. It shouldn't need a DWARF lookup. It may require more complex logic than the most naive form in order to recognize "I am in a leaf function that has elided its frame pointer", but from there it should be a simple matter to recover and get the trace. I am not familiar with the tooling on illumos, however, so I am not sure if dtrace has that amount of recovery logic.

In any case, this sort of thing has previously strongly affected inlining decisions for small-but-critical functions like mul_add.

@workingjubilee
Copy link
Member Author

@jclulow More generally: I made this PR because Windows, Apple, and Linux all use this setting on aarch64 machines and still can use stack-based tracing.

@jclulow
Copy link
Contributor

jclulow commented Jun 27, 2025

I have mentioned it to some colleagues, so hopefully we can study the differences more closely and come up with an answer!

@Enselic
Copy link
Member

Enselic commented Sep 2, 2025

Triage: @jclulow Any update on this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

5 participants