You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running simple ruby scripts with perftools works fine! but i'd like to find the hotspots in my more complex apps but running them with perftools crashes ruby. to reproduce simply try to run rake with perftools:
CPUPROFILE=/tmp/my_app_profile RUBYOPT="-rgem which perftools | tail -1" ruby -S rake
-- C level backtrace information -------------------------------------------
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Activity
tmm1 commentedon Aug 18, 2010
Does this happen if you use the PerfTools::CpuProfiler.start api from within ruby?
Can you catch the segfault inside gdb and post the backtrace?
thieso2 commentedon Aug 19, 2010
found a fix - after a shour gdb session i found that ->me is sometimes nil, why I can't tell.
shipping this "undefined" frame fixes it for me:
patch:
http://gist.github.com/537216
tmm1 commentedon Aug 19, 2010
awesome, thanks for the patch. i just pushed a 0.4.8 gem
thieso2 commentedon Aug 19, 2010
any idea why some frame dont have an ->me ?
tmm1 commentedon Aug 19, 2010
I looked briefly and could not see why. The vm_backtrace_each method in vm.c might provide more details.
It's possible ->me is only set for CFUNC, and not METHOD? What is the value of VM_FRAME_TYPE(cfp) when cfp->me==0