Increase maximum frames and make maximum tail calls configurable#59
Closed
umanwizard wants to merge 1 commit into
Closed
Increase maximum frames and make maximum tail calls configurable#59umanwizard wants to merge 1 commit into
umanwizard wants to merge 1 commit into
Conversation
Member
|
Why not submit this upstream right away? |
Collaborator
|
Oh I see the problem is the native unwinder only does 4 frames per invocation. That’s seems low, does doing more frames per program hit the 4K limit? |
Collaborator
|
What is the tail call limit in the kernel of concern? |
Collaborator
Author
|
@brancz I have. I decided to also submit it to our fork in case the upstream PR takes a while to land. |
Collaborator
Author
|
@gnurizen according to the comment, the limit is 32, and we need to reserve a few in order to call UNWIND_STOP. |
Collaborator
|
So if we only get 30 invocations of the native unwinder at 4 frames a pop how have we enabled more than 120 frames to be unwound or am I missing something? |
Collaborator
Author
|
This PR doesn't actually bump the limit, it just makes it configurable. I will bump the limit in a follow-up PR once this lands. |
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.
Bump the number of frames in the trace struct to 256, and also make the maximum number of allowed tail calls, so downstream users of the library (e.g. Parca) can choose to support deeper stacks possibly at the cost of not working on older kernels.