src/share/vm/interpreter/templateInterpreter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8148630 Sdiff src/share/vm/interpreter

src/share/vm/interpreter/templateInterpreter.cpp

Print this page




  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 "code/codeCacheExtensions.hpp"
  27 #include "interpreter/interpreter.hpp"
  28 #include "interpreter/interpreterRuntime.hpp"
  29 #include "interpreter/interp_masm.hpp"
  30 #include "interpreter/templateInterpreter.hpp"
  31 #include "interpreter/templateInterpreterGenerator.hpp"
  32 #include "interpreter/templateTable.hpp"

  33 #include "memory/resourceArea.hpp"
  34 
  35 #ifndef CC_INTERP
  36 
  37 # define __ _masm->
  38 
  39 void TemplateInterpreter::initialize() {
  40   if (_code != NULL) return;
  41   // assertions
  42   assert((int)Bytecodes::number_of_codes <= (int)DispatchTable::length,
  43          "dispatch table too small");
  44 
  45   AbstractInterpreter::initialize();
  46 
  47   TemplateTable::initialize();
  48 
  49   // generate interpreter
  50   { ResourceMark rm;
  51     TraceTime timer("Interpreter generation", TraceStartupTime);


  52     int code_size = InterpreterCodeSize;
  53     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
  54 #if INCLUDE_JVMTI
  55     if (CodeCacheExtensions::saving_generated_interpreter()) {
  56       // May requires several versions of the codelets.
  57       // Final size will automatically be optimized.
  58       code_size *= 2;
  59     }
  60 #endif
  61     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
  62                           "Interpreter");
  63     TemplateInterpreterGenerator g(_code);
  64   }
  65   if (PrintInterpreter) {
  66     if (CodeCacheExtensions::saving_generated_interpreter() &&
  67         CodeCacheExtensions::use_pregenerated_interpreter()) {
  68       ResourceMark rm;
  69       tty->print("Printing the newly generated interpreter first");
  70       print();
  71       tty->print("Printing the pregenerated interpreter next");




  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 "code/codeCacheExtensions.hpp"
  27 #include "interpreter/interpreter.hpp"
  28 #include "interpreter/interpreterRuntime.hpp"
  29 #include "interpreter/interp_masm.hpp"
  30 #include "interpreter/templateInterpreter.hpp"
  31 #include "interpreter/templateInterpreterGenerator.hpp"
  32 #include "interpreter/templateTable.hpp"
  33 #include "logging/log.hpp"
  34 #include "memory/resourceArea.hpp"
  35 
  36 #ifndef CC_INTERP
  37 
  38 # define __ _masm->
  39 
  40 void TemplateInterpreter::initialize() {
  41   if (_code != NULL) return;
  42   // assertions
  43   assert((int)Bytecodes::number_of_codes <= (int)DispatchTable::length,
  44          "dispatch table too small");
  45 
  46   AbstractInterpreter::initialize();
  47 
  48   TemplateTable::initialize();
  49 
  50   // generate interpreter
  51   { ResourceMark rm;
  52     TraceTime timer("Interpreter generation",
  53                     log_is_enabled(Info, startuptime),
  54                     LogTag::_startuptime);
  55     int code_size = InterpreterCodeSize;
  56     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
  57 #if INCLUDE_JVMTI
  58     if (CodeCacheExtensions::saving_generated_interpreter()) {
  59       // May requires several versions of the codelets.
  60       // Final size will automatically be optimized.
  61       code_size *= 2;
  62     }
  63 #endif
  64     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
  65                           "Interpreter");
  66     TemplateInterpreterGenerator g(_code);
  67   }
  68   if (PrintInterpreter) {
  69     if (CodeCacheExtensions::saving_generated_interpreter() &&
  70         CodeCacheExtensions::use_pregenerated_interpreter()) {
  71       ResourceMark rm;
  72       tty->print("Printing the newly generated interpreter first");
  73       print();
  74       tty->print("Printing the pregenerated interpreter next");


src/share/vm/interpreter/templateInterpreter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File