Hi! This commit adds generated bytecode adapters for MethodHandles. With these adapters it's possible to inline the whole path of a MethodHandleChain, plus the ultimate target, into the caller.
But keep in mind: THIS IS WORK IN PROGRESS and is not enabled by default! A lot of stuff already works, like a number of JRuby benchmarks, but there are also various crashes (that I actually know about). To get your whole call path inlined you may need to tweak the inlining thresholds a little. To inline the call path of a simple GuardWithTest testcase I need to use: -XX:InlineSmallCode=1500 -XX:MaxInlineSize=50 -XX:MaxInlineLevel=15 To find out what thresholds are best for you, build a debug JVM and use: -XX:+PrintCompilation -XX:+PrintInlining If you see something like: @ 4 sun.dyn.ToGeneric$A1::invoke_I already compiled into a medium method you need to increase InlineSmallCode, and for: @ 16 java.lang.Integer::intValue inlining too deep you, obviously, have to increase MaxInlineLevel (note: this switch is only available in debug builds). The need for this tweaking will go away in the future, but for now, if you want to get the whole call path inlined (which may not have the best performance), you have to use some switches. Of course I want feedback about crashes! Preferably with small testcases... :-) -- Christian _______________________________________________ mlvm-dev mailing list [email protected] http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
