-
Notifications
You must be signed in to change notification settings - Fork 205
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Not appear Array#<< result. #132
Comments
The discrepancy is caused by the ruby byte code compiler and the way trace events are generated. For some method invocations, ruby generates shorter byte code. The profiler you load using The following option settings can be used to require unoptimized code generation: RubyVM::InstructionSequence.compile_option = {
:trace_instruction => true,
:specialized_instruction => false
} |
👍 I add below code in bin/ruby-prof
And I run the code (https://gist.github.com/SpringMT/8068584). Appear Array#<< result ! Thank you! |
Turns out that ruby-prof was already trying to mimic profiler, but it used the wrong constant for the ruby vm (VM instead of RubyVM). |
I got the profile below script.
https://gist.github.com/SpringMT/8068584
When use profile, Array#<< result appeared.
https://gist.github.com/SpringMT/8068598
However when use ruby-prof, Array#<< result didn't appear.
https://gist.github.com/SpringMT/8068605
I use ruby 2.0.0p353 and ruby-prof 0.13.1.
The text was updated successfully, but these errors were encountered: