Request for review (S): 7042122: JSR 292: adjust various inline thresholds for JSR 292 API methods and method handle adapters

Christian Thalinger christian.thalinger at oracle.com
Thu May 5 10:40:38 PDT 2011


On May 5, 2011, at 7:22 PM, Vladimir Kozlov wrote:
> Christian,
> 
> your comments does not explain why you need such particular sizes. Where "*3" and "/2" come from?

Right, I forgot to mention that.  These are empirically evaluated numbers and work good with JRuby which uses a couple of very common patterns.  I assume we have to tweak the numbers again in the future when we have more users of the code.

> Also I think you should use one 'if' instead of 2 cmoves:
> 
> +   int default_max_inline_size = C->max_inline_size();
> +   int inline_small_code_size  = InlineSmallCode / 4;
> +   if (callee_holder->is_in_package("java/lang/invoke") ||
> +       callee_holder->is_in_package("sun/invoke") ||
> +       caller_method->is_method_handle_adapter()) {
> +     // adjust default thresholds
> +     default_max_inline_size *= 3;
> +     inline_small_code_size  *= 2;
> +   }
> +   int max_inline_size = default_max_inline_size;

I will change that.

-- Christian

> 
> Vladimir
> 
> Christian Thalinger wrote:
>> http://cr.openjdk.java.net/~twisti/7042122/
>> 7042122: JSR 292: adjust various inline thresholds for JSR 292 API methods and method handle adapters
>> Reviewed-by:
>> The default inline thresholds for various JSR 292 API methods are too
>> small avoiding the possibility to inline through a method handle
>> chain.  Currently it is required to tweak some command line options to
>> get decent performance.  The tweaking should go away.
>> The change also renames two methods to follow our conventions and
>> changed the output of discounting method handle adapters from inlining
>> level.
>> src/share/vm/opto/bytecodeInfo.cpp
>> src/share/vm/opto/parse.hpp




More information about the hotspot-compiler-dev mailing list