-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace <top> label by the required file path #140
base: master
Are you sure you want to change the base?
Conversation
Maybe |
@@ -224,6 +225,17 @@ frame_lines_i(st_data_t key, st_data_t val, st_data_t arg) | |||
return ST_CONTINUE; | |||
} | |||
|
|||
static VALUE | |||
coerce_frame_name(VALUE name, VALUE line) { | |||
char *start_pointer = strstr(RSTRING_PTR(name), "<top (required)>\0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't some sort of strncmp
be better here? Does the string match exactly, or is it sometimes contained within?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It either match exactly or is trailing:
<top (required)>
block in <top (required)>
d79128f
to
89a5f8f
Compare
I resolved the comments. |
Here's what it looks like now:
|
89a5f8f
to
66362c6
Compare
I updated it again, for |
66362c6
to
57b3db3
Compare
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