Request for review (S): 7042122: JSR 292: adjust various inline thresholds for JSR 292 API methods and method handle adapters
christian.thalinger at oracle.com
Thu May 5 12:53:38 PDT 2011
On May 5, 2011, at 9:35 PM, John Rose wrote:
> On May 5, 2011, at 12:11 PM, Tom Rodriguez wrote:
>> I'm not sure we want to enshrine these just yet, do we?
> We know we want more aggressive inlining along deep linear MH chains. (They don't look like bytecodes.) But we need a knob to tune. I think we should have at least one non-specific number like -XX:MethodHandleInlineFactor=50 . Or is there a better way to do it?
>> These settings will affect all code that's in java/lang/invoke, not just method handle call chains. I would expect that some policy that takes into account the calling chain would do better than just tweaking the inline size and small code values.
> You are right, and a better policy would want to take into account named factors such as the above, for tuning experiments.
> Christian, would your change work if the inlining changes were restricted to calls nested within a MH.invoke*? That would probably address the issue Tom raised about effects on code in j/l/i other than MH call chains.
I guess that would work. I will check on that tomorrow.
The reason I came up with something like band-aid fix is because I didn't have enough time to do something more sophisticated and we need something that works in Java 7. JRuby wants to enable invokedynamic by default for the current development version as soon as we have heuristic that makes out-of-the-box performance good enough (reads: equally or better than non-indy).
Tom, do you have a better idea how we could handle that?
More information about the hotspot-compiler-dev