How to profile Ruby 1.9 and/or JRuby code? (ruby-prof works only on MRI Ruby 1.8)


#1

I love ruby-prof, but it unfortunately does not work neither under
MRI Ruby 1.9 nor under JRuby. How can one profile MRI Ruby 1.9
and/or JRuby code?

(I can try backporting my code to Ruby 1.8.7, but it’s additional work
and I doubt profiling for Ruby 1.8.7 will consistently make the code run
better under Ruby 1.9 and JRuby.)

— Shot


#2

Shot (Piotr S.) wrote:

I love ruby-prof, but it unfortunately does not work neither under
MRI Ruby 1.9 nor under JRuby. How can one profile MRI Ruby 1.9
and/or JRuby code?

It appears from the ruby prof log that they used to support 1.9 (till
1.9 changed), so I’d probably fork their code and try to fix the compile
errors in it.
GL!
-=r


#3

Shot (Piotr S.) wrote:

I love ruby-prof, but it unfortunately does not work neither under
MRI Ruby 1.9 nor under JRuby. How can one profile MRI Ruby 1.9
and/or JRuby code?

you can use ruby - prof on 1.9 but looks like you’ll have to check it
out from SVN trunk to get it to compile :slight_smile:

svn checkout svn://rubyforge.org/var/svn/ruby-prof

ref:
http://translate.google.com/translate?hl=en&sl=ja&u=http://d.hatena.ne.jp/hogelog/20090409/p1&ei=OYkCSunJEImEtgOiyeTjAQ&sa=X&oi=translate&resnum=2&ct=result&prev=/search%3Fq%3Druby%2Bprof%2Bprof_event_hook%2Bundeclared%26hl%3Den%26rlz%3D1C1GGLS_enUS316US316

re: jruby profile not sure mayb repost to jruby mailing list?
GL!
-=r