Projects, which use JSR292
Christian Thalinger
christian.thalinger at oracle.com
Fri Feb 18 05:19:56 PST 2011
On Feb 18, 2011, at 1:28 PM, Charles Oliver Nutter wrote:
> On Fri, Feb 18, 2011 at 6:17 AM, Christian Thalinger
> <christian.thalinger at oracle.com> wrote:
>> Is there a switch to turn direct ruby-to-ruby calls on and off? I'd like to compare inlining trees and maybe code output.
>
> Just pushed a couple for you in a4a0802:
>
> jruby.compile.invokedynamic.rubyDirect=true|false (Ruby targets
> directly bind; defaults to true)
> jruby.compile.invokedynamic.nativeDirect=true|false (Native (Java)
> targets directly bind; defaults to true)
>
> Not to put any pressure on, but I had hoped to see this
> directly-binding Ruby calls would *improve* perf :) With this in
> place, the only thing dynopt does that my indy logic doesn't do is
> dispatch literal fixnums directly through as long values (rather than
> as RubyFixnum objects...and yes, this is only in place for literals).
> Ideally, I'd expect optimized invokedynamic to perform as well as
> dynopt in this situation.
What I can tell so far is that setting rubyDirect=true inlines a whole lot more stuff than without. I looks like it wants to inline all recursive calls of fib_ruby into a single method, which doesn't work very well, hitting two limits: NodeCountInliningCutoff and DesiredMethodLimit.
I tried to bump these limits but that is a dead end for the compiler since at one point it skips the compile because it gets too many nodes:
43 COMPILE SKIPPED: out of nodes parsing method (not retryable)
I don't know why it wants to inline all these recursive calls. Is that something JRuby tries to do?
-- Christian
More information about the mlvm-dev
mailing list