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

src/share/vm/interpreter/templateInterpreter.cpp

Print this page




  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");




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