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

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu May 5 10:22:59 PDT 2011


Christian,

your comments does not explain why you need such particular sizes. Where "*3" 
and "/2" come from? 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;

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