Fix unwind and symbol export for _start in C programs#268
Merged
Conversation
Contributor
Author
|
@brianrob There'll be a small |
Member
|
This looks reasonable to me. @beaubelgrave, can you take a look at the ruwind change? @zachcmadsen, please do share the TraceEvent change as well. I have a pending change in this area, and so we may want to merge them, but I haven't posted a PR for it yet. |
beaubelgrave
approved these changes
May 13, 2026
Collaborator
|
Approved and merged, thanks @zachcmadsen! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Below is a stack from a simple C program
workload. I collected the trace withrecord-trace --on-cpu --pid <pid>on an Azure VM running Azure Linux. There's a couple problems. We don't resolveworkload!_startand we try to unwind past it.Changes
add_matching_symbols. Symbols whose only matching IP is their last byte don't get exported with the current exclusive boundary. That always seems to be the case for_start. It looks like we use an inclusive boundary in other places too:elf.rsandgraph.rsunwind_to_cfato end unwinds at_startResult
Stack after changes
and with corresponding
TraceEventchanges: