< prev index next >

src/share/vm/interpreter/interpreterRuntime.cpp

Print this page




  42 #include "oops/symbol.hpp"
  43 #include "prims/jvmtiExport.hpp"
  44 #include "prims/nativeLookup.hpp"
  45 #include "runtime/biasedLocking.hpp"
  46 #include "runtime/compilationPolicy.hpp"
  47 #include "runtime/deoptimization.hpp"
  48 #include "runtime/fieldDescriptor.hpp"
  49 #include "runtime/handles.inline.hpp"
  50 #include "runtime/interfaceSupport.hpp"
  51 #include "runtime/java.hpp"
  52 #include "runtime/jfieldIDWorkaround.hpp"
  53 #include "runtime/osThread.hpp"
  54 #include "runtime/sharedRuntime.hpp"
  55 #include "runtime/stubRoutines.hpp"
  56 #include "runtime/synchronizer.hpp"
  57 #include "runtime/threadCritical.hpp"
  58 #include "utilities/events.hpp"
  59 #ifdef TARGET_ARCH_x86
  60 # include "vm_version_x86.hpp"
  61 #endif



  62 #ifdef TARGET_ARCH_sparc
  63 # include "vm_version_sparc.hpp"
  64 #endif
  65 #ifdef TARGET_ARCH_zero
  66 # include "vm_version_zero.hpp"
  67 #endif
  68 #ifdef TARGET_ARCH_arm
  69 # include "vm_version_arm.hpp"
  70 #endif
  71 #ifdef TARGET_ARCH_ppc
  72 # include "vm_version_ppc.hpp"
  73 #endif
  74 #ifdef COMPILER2
  75 #include "opto/runtime.hpp"
  76 #endif
  77 
  78 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  79 
  80 class UnlockFlagSaver {
  81   private:


1269 GrowableArray<address>*  SignatureHandlerLibrary::_handlers     = NULL;
1270 address                  SignatureHandlerLibrary::_buffer       = NULL;
1271 
1272 
1273 IRT_ENTRY(void, InterpreterRuntime::prepare_native_call(JavaThread* thread, Method* method))
1274   methodHandle m(thread, method);
1275   assert(m->is_native(), "sanity check");
1276   // lookup native function entry point if it doesn't exist
1277   bool in_base_library;
1278   if (!m->has_native_function()) {
1279     NativeLookup::lookup(m, in_base_library, CHECK);
1280   }
1281   // make sure signature handler is installed
1282   SignatureHandlerLibrary::add(m);
1283   // The interpreter entry point checks the signature handler first,
1284   // before trying to fetch the native entry point and klass mirror.
1285   // We must set the signature handler last, so that multiple processors
1286   // preparing the same method will be sure to see non-null entry & mirror.
1287 IRT_END
1288 
1289 #if defined(IA32) || defined(AMD64) || defined(ARM)
1290 IRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address))
1291   if (src_address == dest_address) {
1292     return;
1293   }
1294   ResetNoHandleMark rnm; // In a LEAF entry.
1295   HandleMark hm;
1296   ResourceMark rm;
1297   frame fr = thread->last_frame();
1298   assert(fr.is_interpreted_frame(), "");
1299   jint bci = fr.interpreter_frame_bci();
1300   methodHandle mh(thread, fr.interpreter_frame_method());
1301   Bytecode_invoke invoke(mh, bci);
1302   ArgumentSizeComputer asc(invoke.signature());
1303   int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver
1304   Copy::conjoint_jbytes(src_address, dest_address,
1305                        size_of_arguments * Interpreter::stackElementSize);
1306 IRT_END
1307 #endif
1308 
1309 #if INCLUDE_JVMTI




  42 #include "oops/symbol.hpp"
  43 #include "prims/jvmtiExport.hpp"
  44 #include "prims/nativeLookup.hpp"
  45 #include "runtime/biasedLocking.hpp"
  46 #include "runtime/compilationPolicy.hpp"
  47 #include "runtime/deoptimization.hpp"
  48 #include "runtime/fieldDescriptor.hpp"
  49 #include "runtime/handles.inline.hpp"
  50 #include "runtime/interfaceSupport.hpp"
  51 #include "runtime/java.hpp"
  52 #include "runtime/jfieldIDWorkaround.hpp"
  53 #include "runtime/osThread.hpp"
  54 #include "runtime/sharedRuntime.hpp"
  55 #include "runtime/stubRoutines.hpp"
  56 #include "runtime/synchronizer.hpp"
  57 #include "runtime/threadCritical.hpp"
  58 #include "utilities/events.hpp"
  59 #ifdef TARGET_ARCH_x86
  60 # include "vm_version_x86.hpp"
  61 #endif
  62 #ifdef TARGET_ARCH_aarch64
  63 # include "vm_version_aarch64.hpp"
  64 #endif
  65 #ifdef TARGET_ARCH_sparc
  66 # include "vm_version_sparc.hpp"
  67 #endif
  68 #ifdef TARGET_ARCH_zero
  69 # include "vm_version_zero.hpp"
  70 #endif
  71 #ifdef TARGET_ARCH_arm
  72 # include "vm_version_arm.hpp"
  73 #endif
  74 #ifdef TARGET_ARCH_ppc
  75 # include "vm_version_ppc.hpp"
  76 #endif
  77 #ifdef COMPILER2
  78 #include "opto/runtime.hpp"
  79 #endif
  80 
  81 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  82 
  83 class UnlockFlagSaver {
  84   private:


1272 GrowableArray<address>*  SignatureHandlerLibrary::_handlers     = NULL;
1273 address                  SignatureHandlerLibrary::_buffer       = NULL;
1274 
1275 
1276 IRT_ENTRY(void, InterpreterRuntime::prepare_native_call(JavaThread* thread, Method* method))
1277   methodHandle m(thread, method);
1278   assert(m->is_native(), "sanity check");
1279   // lookup native function entry point if it doesn't exist
1280   bool in_base_library;
1281   if (!m->has_native_function()) {
1282     NativeLookup::lookup(m, in_base_library, CHECK);
1283   }
1284   // make sure signature handler is installed
1285   SignatureHandlerLibrary::add(m);
1286   // The interpreter entry point checks the signature handler first,
1287   // before trying to fetch the native entry point and klass mirror.
1288   // We must set the signature handler last, so that multiple processors
1289   // preparing the same method will be sure to see non-null entry & mirror.
1290 IRT_END
1291 
1292 #if defined(IA32) || defined(AMD64) || defined(ARM) || defined(AARCH64)
1293 IRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address))
1294   if (src_address == dest_address) {
1295     return;
1296   }
1297   ResetNoHandleMark rnm; // In a LEAF entry.
1298   HandleMark hm;
1299   ResourceMark rm;
1300   frame fr = thread->last_frame();
1301   assert(fr.is_interpreted_frame(), "");
1302   jint bci = fr.interpreter_frame_bci();
1303   methodHandle mh(thread, fr.interpreter_frame_method());
1304   Bytecode_invoke invoke(mh, bci);
1305   ArgumentSizeComputer asc(invoke.signature());
1306   int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver
1307   Copy::conjoint_jbytes(src_address, dest_address,
1308                        size_of_arguments * Interpreter::stackElementSize);
1309 IRT_END
1310 #endif
1311 
1312 #if INCLUDE_JVMTI


< prev index next >