< 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  *


 349   if (InlineAccessors && callee_method->is_accessor()) {
 350     // accessor methods are not subject to any of the following limits.
 351     set_msg("accessor");
 352     return true;
 353   }
 354 
 355   // suppress a few checks for accessors and trivial methods
 356   if (callee_method->code_size() > MaxTrivialSize) {
 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   }


   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  *


 349   if (InlineAccessors && callee_method->is_accessor()) {
 350     // accessor methods are not subject to any of the following limits.
 351     set_msg("accessor");
 352     return true;
 353   }
 354 
 355   // suppress a few checks for accessors and trivial methods
 356   if (callee_method->code_size() > MaxTrivialSize) {
 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 || InlineConstructors) &&
 370         is_init_with_ea(callee_method, caller_method, C)) {
 371       // Escape Analysis stress testing when running Xcomp or if InlineConstructors is true:
 372       // inline constructors even if they are not reached.
 373       set_msg("constructor");
 374     } else if (forced_inline()) {
 375       // Inlining was forced by CompilerOracle, ciReplay or annotation
 376     } else if (profile.count() == 0) {
 377       // don't inline unreached call sites
 378        set_msg("call site not reached");
 379        return false;
 380     }
 381   }
 382 
 383   if (!C->do_inlining() && InlineAccessors) {
 384     set_msg("not an accessor");
 385     return false;
 386   }
 387 
 388   // Limit inlining depth in case inlining is forced or
 389   // _max_inline_level was increased to compensate for lambda forms.
 390   if (inline_level() > MaxForceInlineLevel) {
 391     set_msg("MaxForceInlineLevel");
 392     return false;
 393   }


< prev index next >