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.
This commit records line numbers in raw mode along with the frame information.
Before this commit, stackprof would lose information about callee frames at a particular line. For example, you could not answer "given a frame and line, what function do we call in to at that line?" This commit encodes the line information along with the raw frame information so that we can answer that question.
This is probably TMI, but when we ask the Ruby frame profiler, it returns a list of memory addresses (CMEs or possibly iseqs?). AArch64 systems guarantee the top 16 bits won't be used, x86 doesn't use them either (but possibly could in the future, but probably not). Armed with this information, we just put the line number in those top 16 bits and we don't need to allocate any extra memory when doing a profile.
For backwards compatibility, this patch splits apart the information in the
.result
method so existing tools should just work.