Projects, which use JSR292

Charles Oliver Nutter headius at headius.com
Fri Feb 18 04:33:29 PST 2011


FYI, my "patches/hotspot" dir is at revision 6eddc7cbeba6

- Charlie

On Fri, Feb 18, 2011 at 6:28 AM, Charles Oliver Nutter
<headius at headius.com> 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.
>
> Here's output with all four permutations:
>
> ~/projects/jruby ➔
> JAVA_HOME=../mlvm/sources/build/bsd-i586/j2sdk-image/ jruby --server
> -X+C -Xcompile.invokedynamic=true -J-XX:+UnlockExperimentalVMOptions
> -J-XX:+EnableInvokeDynamic -J-XX:+UnlockDiagnosticVMOptions
> -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000
> bench/bench_fib_recursive.rb 5
> 832040
>  1.037000   0.000000   1.037000 (  0.882000)
> 832040
>  0.479000   0.000000   0.479000 (  0.479000)
> 832040
>  0.474000   0.000000   0.474000 (  0.474000)
> 832040
>  0.458000   0.000000   0.458000 (  0.458000)
> 832040
>  0.461000   0.000000   0.461000 (  0.461000)
>
> ~/projects/jruby ➔
> JAVA_HOME=../mlvm/sources/build/bsd-i586/j2sdk-image/ jruby --server
> -X+C -Xcompile.invokedynamic=true -J-XX:+UnlockExperimentalVMOptions
> -J-XX:+EnableInvokeDynamic -J-XX:+UnlockDiagnosticVMOptions
> -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000
> -Xcompile.invokedynamic.rubyDirect=false bench/bench_fib_recursive.rb
> 5
> 832040
>  0.363000   0.000000   0.363000 (  0.297000)
> 832040
>  0.160000   0.000000   0.160000 (  0.160000)
> 832040
>  0.156000   0.000000   0.156000 (  0.156000)
> 832040
>  0.155000   0.000000   0.155000 (  0.155000)
> 832040
>  0.162000   0.000000   0.162000 (  0.162000)
>
> ~/projects/jruby ➔
> JAVA_HOME=../mlvm/sources/build/bsd-i586/j2sdk-image/ jruby --server
> -X+C -Xcompile.invokedynamic=true -J-XX:+UnlockExperimentalVMOptions
> -J-XX:+EnableInvokeDynamic -J-XX:+UnlockDiagnosticVMOptions
> -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000
> -Xcompile.invokedynamic.nativeDirect=false
> bench/bench_fib_recursive.rb 5
> 832040
>  1.420000   0.000000   1.420000 (  1.345000)
> 832040
>  1.030000   0.000000   1.030000 (  1.030000)
> 832040
>  1.012000   0.000000   1.012000 (  1.012000)
> 832040
>  1.023000   0.000000   1.023000 (  1.023000)
> 832040
>  1.010000   0.000000   1.010000 (  1.011000)
>
> ~/projects/jruby ➔
> JAVA_HOME=../mlvm/sources/build/bsd-i586/j2sdk-image/ jruby --server
> -X+C -Xcompile.invokedynamic=true -J-XX:+UnlockExperimentalVMOptions
> -J-XX:+EnableInvokeDynamic -J-XX:+UnlockDiagnosticVMOptions
> -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000
> -Xcompile.invokedynamic.rubyDirect=false
> -Xcompile.invokedynamic.nativeDirect=false
> bench/bench_fib_recursive.rb 5
> 832040
>  0.380000   0.000000   0.380000 (  0.297000)
> 832040
>  0.167000   0.000000   0.167000 (  0.167000)
> 832040
>  0.157000   0.000000   0.157000 (  0.157000)
> 832040
>  0.156000   0.000000   0.156000 (  0.156000)
> 832040
>  0.164000   0.000000   0.164000 (  0.164000)
>
> - Charlie
>


More information about the mlvm-dev mailing list