Replace <top> label by the required file path#140
Open
casperisfine wants to merge 1 commit intotmm1:masterfrom
Open
Replace <top> label by the required file path#140casperisfine wants to merge 1 commit intotmm1:masterfrom
casperisfine wants to merge 1 commit intotmm1:masterfrom
Conversation
Contributor
Author
|
Maybe |
tmm1
requested changes
Jul 6, 2020
|
|
||
| static VALUE | ||
| coerce_frame_name(VALUE name, VALUE line) { | ||
| char *start_pointer = strstr(RSTRING_PTR(name), "<top (required)>\0"); |
Owner
There was a problem hiding this comment.
Wouldn't some sort of strncmp be better here? Does the string match exactly, or is it sometimes contained within?
Contributor
Author
There was a problem hiding this comment.
It either match exactly or is trailing:
<top (required)>block in <top (required)>
d79128f to
89a5f8f
Compare
Contributor
Author
|
I resolved the comments. |
Contributor
Author
|
Here's what it looks like now: |
89a5f8f to
66362c6
Compare
Contributor
Author
|
I updated it again, for |
66362c6 to
57b3db3
Compare
Quiwin
added a commit
to Quiwin/stackprof
that referenced
this pull request
Mar 19, 2025
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.
For context I'm trying to profile rubygems loading, which mean lot's of the time is spent on the initial file evaluations, whihc appear as
<top (required)>.This makes it very hard to see where time is spent as all required files use the same label.
The idea here is to basically do
name.gsub('<top (required)>', file), but I'm open to other ways to replace that label.cc @tenderlove