Projects, which use JSR292

Christian Thalinger christian.thalinger at oracle.com
Mon Feb 21 07:20:05 PST 2011


On Feb 21, 2011, at 3:10 PM, Charles Oliver Nutter wrote:
> On Mon, Feb 21, 2011 at 7:19 AM, Christian Thalinger
> <christian.thalinger at oracle.com> wrote:
>>> I was dozing this afternoon and wondered if perhaps the indy recursive
>>> calls are not reducing the recursive inlining count within Hotspot.
>>> Perhaps it could explain why recursive calls are being inlined so
>>> heavily, potentially to the exclusion of other calls?
>> 
>> Yeah, I suspect something like that.
> 
> Some evidence to support...I modified the benchmark to pass all
> previously recursive calls through an intermediate function. Since
> it's fixed-arity with no block, it should directly bind through indy
> just fine.
> 
> Perf improves by 2x! That's not enough to bring it back to the
> non-ruby-inlining setup, but perhaps it demonstrates that there's an
> issue with recursive inlining (for a start).

What about that?

$ bin/jruby.sh --server -Xcompile.invokedynamic=true -J-XX:+UseSerialGC -J-XX:+UnlockExperimentalVMOptions -J-XX:+EnableMethodHandles -J-XX:+EnableInvokeDynamic -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000 -Xcompile.invokedynamic.rubyDirect=false bench/bench_fib_recursive.rb
  0.403000   0.000000   0.403000 (  0.209000)
  0.131000   0.000000   0.131000 (  0.131000)
  0.131000   0.000000   0.131000 (  0.131000)
  0.131000   0.000000   0.131000 (  0.131000)
  0.131000   0.000000   0.131000 (  0.131000)

$ bin/jruby.sh --server -Xcompile.invokedynamic=true -J-XX:+UseSerialGC -J-XX:+UnlockExperimentalVMOptions -J-XX:+EnableMethodHandles -J-XX:+EnableInvokeDynamic -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000 -Xcompile.invokedynamic.rubyDirect=true bench/bench_fib_recursive.rb
  0.241000   0.000000   0.241000 (  0.189000)
  0.126000   0.000000   0.126000 (  0.126000)
  0.126000   0.000000   0.126000 (  0.126000)
  0.127000   0.000000   0.127000 (  0.127000)
  0.126000   0.000000   0.126000 (  0.126000)

$ bin/jruby.sh --server -Xcompile.invokedynamic=true -J-XX:+UseSerialGC -J-XX:+UnlockExperimentalVMOptions -J-XX:+EnableMethodHandles -J-XX:+EnableInvokeDynamic -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000 -Xcompile.invokedynamic.rubyDirect=false -Xcompile.invokedynamic.nativeDirect=false bench/bench_fib_recursive.rb
  0.282000   0.000000   0.282000 (  0.228000)
  0.148000   0.000000   0.148000 (  0.148000)
  0.149000   0.000000   0.149000 (  0.149000)
  0.148000   0.000000   0.148000 (  0.148000)
  0.149000   0.000000   0.149000 (  0.149000)

$ bin/jruby.sh --server -Xcompile.invokedynamic=true -J-XX:+UseSerialGC -J-XX:+UnlockExperimentalVMOptions -J-XX:+EnableMethodHandles -J-XX:+EnableInvokeDynamic -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=5000 -Xcompile.invokedynamic.rubyDirect=true -Xcompile.invokedynamic.nativeDirect=true bench/bench_fib_recursive.rb
  0.243000   0.000000   0.243000 (  0.190000)
  0.128000   0.000000   0.128000 (  0.128000)
  0.127000   0.000000   0.127000 (  0.127000)
  0.127000   0.000000   0.127000 (  0.127000)
  0.127000   0.000000   0.127000 (  0.127000)



More information about the mlvm-dev mailing list