From: "Shot (Piotr Szotkowski)" Date: 2009-08-22T11:58:21+09:00 Subject: ruby-prof on Ruby 1.9 woes --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I=E2=80=99m trying to use ruby-prof with Ruby 1.9.1p243 on 64-bit Ubuntu. The current released version doesn=E2=80=99t work, but a gem built from the ruby-prof=E2=80=99s svn repo=E2=80=99s trunk at least installs properly. Un= fortunately, when trying to profile a Ruby 1.9 it breaks as described at http://redmine.ruby-lang.org/issues/show/1227 I tried to clone http://github.com/trafficbroker/ruby-prof and =E2=80=98rake gem=E2=80=99, but a subsequent =E2=80=98gem install=E2=80=99 = attempt results in Building native extensions. This could take a while... ERROR: Error installing ruby-prof-0.7.3.2.gem: ERROR: Failed to build gem native extension. /home/shot/opt/ruby-1.9.1-p243/bin/ruby extconf.rb install ruby-prof-0.7.3.= 2.gem checking for sys/times.h... yes checking for rb_os_allocated_objects()... no checking for rb_gc_allocated_size()... no checking for rb_gc_collections()... no checking for rb_gc_time()... no checking for rb_heap_total_mem()... no checking for rb_gc_heap_info()... no checking for rb_gc_malloc_allocations()... no checking for rb_gc_malloc_allocated_size()... no creating Makefile make gcc -I. -I/home/shot/opt/ruby-1.9.1-p243/include/ruby-1.9.1/x86_64-linux -I= /home/shot/opt/ruby-1.9.1-p243/include/ruby-1.9.1/ruby/backward -I/home/sho= t/opt/ruby-1.9.1-p243/include/ruby-1.9.1 -I. -DHAVE_SYS_TIMES_H -fPIC -= O2 -g -Wall -Wno-parentheses -o ruby_prof.o -c ruby_prof.c ruby_prof.c:890: error: expected declaration specifiers or =E2=80=98...=E2= =80=99 before =E2=80=98NODE=E2=80=99 ruby_prof.c: In function =E2=80=98prof_event_hook=E2=80=99: ruby_prof.c:1137: error: =E2=80=98node=E2=80=99 undeclared (first use in th= is function) ruby_prof.c:1137: error: (Each undeclared identifier is reported only once ruby_prof.c:1137: error: for each function it appears in.) ruby_prof.c:1137: error: too many arguments to function =E2=80=98get_method= =E2=80=99 ruby_prof.c:1143: warning: passing argument 5 of =E2=80=98get_method=E2=80= =99 makes pointer from integer without a cast ruby_prof.c:1143: error: too many arguments to function =E2=80=98get_method= =E2=80=99 make: *** [ruby_prof.o] Error 1 I finally tried to use upstream ruby-prof 0.7.3 patched just with the patch from http://redmine.ruby-lang.org/issues/show/1227#note-6 but this makes the profiling run for ages in most of my cases. I even tested this in a freshly-setup 32-bit Ubuntu, but with the same results. :| Does anyone know of a way to make ruby-prof work in sensible time in my case? Steps to reproduce: 1. Install any ruby-prof version that=E2=80=99s supposed to work with Ruby = 1.9 2. git clone git://github.com/Chastell/art-decomp.git 3. cd art-decomp 4. export RUBYOPT=3D"$RUBYOPT -Ku' # -Ku doesn=E2=80=99t work in shebang on= Linux $ time bin/inputs kiss/s510 =E2=80=A6 real 0m0.571s user 0m0.468s sys 0m0.008s $ time bin/inputs kiss/s420 =E2=80=A6 real 0m1.183s user 0m1.040s sys 0m0.012s $ time ruby-prof bin/inputs kiss/s510 =E2=80=A6 real 0m2.862s user 0m2.100s sys 0m0.556s $ time ruby-prof bin/inputs kiss/s420 =E2=80=A6 [take ages, but does finish eventually] =E2=80=94 Shot --=20 Triskadekaphobiacs are presumably upset that, although 13.untrust appears to succeed and reinforce their beliefs, the state doesn=E2=80=99t stick; 13.un= trusted? subsequently returns false. Similarly, logicians and cynics alike must, respectively, rejoice and despair that true.untrust.untrusted? is perpetually false. [Run Paint Run Run, ruby-core] --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqPXscACgkQi/mCfdEo8Uop6QCgh44keqnH+fqKYU/6wZtiuzHl 9JYAnRvskvvwk0GMx3YzVXH7WhcT63DX =M96u -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--