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


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


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


< prev index next >