review for 7071307: MethodHandle bimorphic inlining should consider the frequency
tom.rodriguez at oracle.com
Fri Jul 29 10:24:25 PDT 2011
On Jul 28, 2011, at 6:03 PM, Vladimir Kozlov wrote:
> I think you need to check which path has IfTrue project to apply probability from IfNode.
I originally had code to do that but I convinced myself it wasn't needed though now I can't imagine what I was thinking. Currently these if's are all structured such that they don't need to be swapped but there's no reason they couldn't be. I've updated the webrev.
> Tom Rodriguez wrote:
>> 46 lines changed: 27 ins; 6 del; 13 mod; 3568 unchg
>> 7071307: MethodHandle bimorphic inlining should consider the frequency
>> The fix for 7050554 added a bimorphic inline path but didn't take into
>> account the frequency of the guarding test. This ends up treating
>> both sides of the if as equally frequent which can lead to over
>> inlining and overflowing the method inlining limits. The fix is to
>> grab the frequency from the If and apply that to the branches. This
>> addresses a major source of overinlining that can result in bad
>> performance with JSR 292. We may do a later extension to this to
>> actually do per call chain profiling of selectAlternative but that's a
>> more complicated fix.
>> I also fixed a problem with the ideal graph printer where debug_orig
>> printing would go into an infinite loop.
>> Tested with jruby and vm.mlvm tests.
More information about the hotspot-compiler-dev