[Yarv-devel] benchmark crashing and register questions

SASADA Koichi ko1 at atdot.net
Sat Jan 22 07:54:43 EST 2005


 gabriele renzi <surrender_it at yahoo.it>
 Sat, 22 Jan 2005 12:46:00 +0100 (CET) / [Yarv-devel] benchmark crashing and register questions

Hi,

>I was playing with the latest yarv(rev123) 
>with ruby 1.9.0 (2005-01-21)
>compiled with gcc 3.4.2 (mingw-special)
>on my windows box (XP pro SP2)
>over my Athlon cpu (AthlonXP 2000+)
>
>I noticed yarv crashes on its own benchmarks:
>
>
>      user     system      total        real
>ruby 29.162000   0.530000  29.692000 ( 30.233000)
>./benchmark/bm_so_object.rb:57: [BUG] BUG: unknown
>node: NODE_SUPER
>ruby 1.9.0 (2005-01-21) [i386-mingw32]
>
>
>This application has requested the Runtime to
>terminate it in an unusual way.
>Please contact the application's support team for more
>information.
>
>** benchmark failure: Invalid argument
>./benchmark/run.rb:74:in `gets'
>./benchmark/run.rb:74:in `benchmark'
>./benchmark/run.rb:71:in `popen'
>./benchmark/run.rb:71:in `benchmark'
>./benchmark/run.rb:85:in `yarv_exec'
>./benchmark/run.rb:37:in `bm'
>./benchmark/run.rb:96
>./benchmark/run.rb:94:in `each'
>./benchmark/run.rb:94
>

It's known bug.

This problem occurs when scripts use "rb_call_super"
YARV doesn't support it.


>Another little thing: I noticed there are quite a bit
>of "register" variables, but I wonder if they are
>worthy in a register starved architecture like x86. 
>
>Also, given that lots of stuff is in registers..
>koichi, have you considered caching the top of the
>stack too? It seems a resonably simple optimization to
>me, just requiring tuning of instructions, and it
>could be useful in architectures with lots of
>registers such as x86-64/IA-64/ppc.

Yes, some "VM registers" saved on machine stack (not on machine registers).
On PPC, I tried but not saved on registers. I must optimize for
each architecture. GCC has some schemes to choose registers to C variable,
so I try it.

http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Local-Reg-Vars.html#Local-Reg-Vars

>
> 
>As usual, I beg you pardon for being total lame in C,
>so if my questions seem really stupid try to consider
>answers as "yarv documentation for dummies" :)

I will write documents, but on Japanese :-P


-- 
// SASADA Koichi at atdot dot net
//



More information about the Yarv-devel mailing list