src/share/vm/opto/bytecodeInfo.cpp

Print this page




   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  *
  23  */
  24 
  25 #include "incls/_precompiled.incl"
  26 #include "incls/_bytecodeInfo.cpp.incl"







  27 
  28 //=============================================================================
  29 //------------------------------InlineTree-------------------------------------
  30 InlineTree::InlineTree( Compile* c,
  31                         const InlineTree *caller_tree, ciMethod* callee,
  32                         JVMState* caller_jvms, int caller_bci,
  33                         float site_invoke_ratio, int site_depth_adjust)
  34 : C(c), _caller_jvms(caller_jvms),
  35   _caller_tree((InlineTree*)caller_tree),
  36   _method(callee), _site_invoke_ratio(site_invoke_ratio),
  37   _site_depth_adjust(site_depth_adjust),
  38   _count_inline_bcs(method()->code_size())
  39 {
  40   NOT_PRODUCT(_count_inlines = 0;)
  41   if (_caller_jvms != NULL) {
  42     // Keep a private copy of the caller_jvms:
  43     _caller_jvms = new (C) JVMState(caller_jvms->method(), caller_tree->caller_jvms());
  44     _caller_jvms->set_bci(caller_jvms->bci());
  45     assert(!caller_jvms->should_reexecute(), "there should be no reexecute bytecode with inlining");
  46   }




   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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "compiler/compileLog.hpp"
  29 #include "interpreter/linkResolver.hpp"
  30 #include "oops/objArrayKlass.hpp"
  31 #include "opto/callGenerator.hpp"
  32 #include "opto/parse.hpp"
  33 #include "runtime/handles.inline.hpp"
  34 
  35 //=============================================================================
  36 //------------------------------InlineTree-------------------------------------
  37 InlineTree::InlineTree( Compile* c,
  38                         const InlineTree *caller_tree, ciMethod* callee,
  39                         JVMState* caller_jvms, int caller_bci,
  40                         float site_invoke_ratio, int site_depth_adjust)
  41 : C(c), _caller_jvms(caller_jvms),
  42   _caller_tree((InlineTree*)caller_tree),
  43   _method(callee), _site_invoke_ratio(site_invoke_ratio),
  44   _site_depth_adjust(site_depth_adjust),
  45   _count_inline_bcs(method()->code_size())
  46 {
  47   NOT_PRODUCT(_count_inlines = 0;)
  48   if (_caller_jvms != NULL) {
  49     // Keep a private copy of the caller_jvms:
  50     _caller_jvms = new (C) JVMState(caller_jvms->method(), caller_tree->caller_jvms());
  51     _caller_jvms->set_bci(caller_jvms->bci());
  52     assert(!caller_jvms->should_reexecute(), "there should be no reexecute bytecode with inlining");
  53   }