< prev index next >

src/hotspot/share/opto/bytecodeInfo.cpp

Print this page


   1 /*
   2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 357 
 358     // don't inline into giant methods
 359     if (C->over_inlining_cutoff()) {
 360       if ((!callee_method->force_inline() && !caller_method->is_compiled_lambda_form())
 361           || !IncrementalInline) {
 362         set_msg("NodeCountInliningCutoff");
 363         return false;
 364       } else {
 365         should_delay = true;
 366       }
 367     }
 368 
 369     if (!UseInterpreter &&
 370         is_init_with_ea(callee_method, caller_method, C)) {
 371       // Escape Analysis stress testing when running Xcomp:
 372       // inline constructors even if they are not reached.
 373     } else if (forced_inline()) {
 374       // Inlining was forced by CompilerOracle, ciReplay or annotation
 375     } else if (profile.count() == 0) {
 376       // don't inline unreached call sites


 377        set_msg("call site not reached");
 378        return false;

 379     }
 380   }
 381 
 382   if (!C->do_inlining() && InlineAccessors) {
 383     set_msg("not an accessor");
 384     return false;
 385   }
 386 
 387   // Limit inlining depth in case inlining is forced or
 388   // _max_inline_level was increased to compensate for lambda forms.
 389   if (inline_level() > MaxForceInlineLevel) {
 390     set_msg("MaxForceInlineLevel");
 391     return false;
 392   }
 393   if (inline_level() > _max_inline_level) {
 394     if (!callee_method->force_inline() || !IncrementalInline) {
 395       set_msg("inlining too deep");
 396       return false;
 397     } else if (!C->inlining_incrementally()) {
 398       should_delay = true;


   1 /*
   2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 357 
 358     // don't inline into giant methods
 359     if (C->over_inlining_cutoff()) {
 360       if ((!callee_method->force_inline() && !caller_method->is_compiled_lambda_form())
 361           || !IncrementalInline) {
 362         set_msg("NodeCountInliningCutoff");
 363         return false;
 364       } else {
 365         should_delay = true;
 366       }
 367     }
 368 
 369     if (!UseInterpreter &&
 370         is_init_with_ea(callee_method, caller_method, C)) {
 371       // Escape Analysis stress testing when running Xcomp:
 372       // inline constructors even if they are not reached.
 373     } else if (forced_inline()) {
 374       // Inlining was forced by CompilerOracle, ciReplay or annotation
 375     } else if (profile.count() == 0) {
 376       // don't inline unreached call sites
 377       // make a not-inline decision more conservatively for callers with loops
 378       if (!caller_method->has_loops() || caller_method->interpreter_invocation_count() > Tier3MinInvocationThreshold) {
 379         set_msg("call site not reached");
 380         return false;
 381       }
 382     }
 383   }
 384 
 385   if (!C->do_inlining() && InlineAccessors) {
 386     set_msg("not an accessor");
 387     return false;
 388   }
 389 
 390   // Limit inlining depth in case inlining is forced or
 391   // _max_inline_level was increased to compensate for lambda forms.
 392   if (inline_level() > MaxForceInlineLevel) {
 393     set_msg("MaxForceInlineLevel");
 394     return false;
 395   }
 396   if (inline_level() > _max_inline_level) {
 397     if (!callee_method->force_inline() || !IncrementalInline) {
 398       set_msg("inlining too deep");
 399       return false;
 400     } else if (!C->inlining_incrementally()) {
 401       should_delay = true;


< prev index next >