< prev index next >

src/hotspot/share/runtime/sharedRuntime.hpp

Print this page

408 
409   // A i2c adapter is simpler than the c2i adapter. This is because it is assumed
410   // that the interpreter before it does any call dispatch will record the current
411   // stack pointer in the interpreter frame. On return it will restore the stack
412   // pointer as needed. This means the i2c adapter code doesn't need any special
413   // handshaking path with compiled code to keep the stack walking correct.
414 
415   static AdapterHandlerEntry* generate_i2c2i_adapters(MacroAssembler *_masm,
416                                                       int total_args_passed,
417                                                       int max_arg,
418                                                       const BasicType *sig_bt,
419                                                       const VMRegPair *regs,
420                                                       AdapterFingerPrint* fingerprint);
421 
422   static void gen_i2c_adapter(MacroAssembler *_masm,
423                               int total_args_passed,
424                               int comp_args_on_stack,
425                               const BasicType *sig_bt,
426                               const VMRegPair *regs);
427 

428   // OSR support
429 
430   // OSR_migration_begin will extract the jvm state from an interpreter
431   // frame (locals, monitors) and store the data in a piece of C heap
432   // storage. This then allows the interpreter frame to be removed from the
433   // stack and the OSR nmethod to be called. That method is called with a
434   // pointer to the C heap storage. This pointer is the return value from
435   // OSR_migration_begin.
436 
437   static intptr_t* OSR_migration_begin(JavaThread *thread);
438 
439   // OSR_migration_end is a trivial routine. It is called after the compiled
440   // method has extracted the jvm state from the C heap that OSR_migration_begin
441   // created. It's entire job is to simply free this storage.
442   static void OSR_migration_end(intptr_t* buf);
443 
444   // Convert a sig into a calling convention register layout
445   // and find interesting things about it.
446   static VMRegPair* find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int *arg_size);
447   static VMReg name_for_receiver();

473   // returns.
474   //
475   // The wrapper may contain special-case code if the given method
476   // is a JNI critical method, or a compiled method handle adapter,
477   // such as _invokeBasic, _linkToVirtual, etc.
478   static nmethod* generate_native_wrapper(MacroAssembler* masm,
479                                           const methodHandle& method,
480                                           int compile_id,
481                                           BasicType* sig_bt,
482                                           VMRegPair* regs,
483                                           BasicType ret_type,
484                                           address critical_entry);
485 
486   // A compiled caller has just called the interpreter, but compiled code
487   // exists.  Patch the caller so he no longer calls into the interpreter.
488   static void fixup_callers_callsite(Method* moop, address ret_pc);
489   static bool should_fixup_call_destination(address destination, address entry_point, address caller_pc, Method* moop, CodeBlob* cb);
490 
491   // Slow-path Locking and Unlocking
492   static void complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* current);

493   static void complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock, JavaThread* current);
494 
495   // Resolving of calls
496   static address resolve_static_call_C     (JavaThread* current);
497   static address resolve_virtual_call_C    (JavaThread* current);
498   static address resolve_opt_virtual_call_C(JavaThread* current);
499 
500   // arraycopy, the non-leaf version.  (See StubRoutines for all the leaf calls.)
501   static void slow_arraycopy_C(oopDesc* src,  jint src_pos,
502                                oopDesc* dest, jint dest_pos,
503                                jint length, JavaThread* thread);
504 
505   // handle ic miss with caller being compiled code
506   // wrong method handling (inline cache misses, zombie methods)
507   static address handle_wrong_method(JavaThread* current);
508   static address handle_wrong_method_abstract(JavaThread* current);
509   static address handle_wrong_method_ic_miss(JavaThread* current);
510 
511   static address handle_unsafe_access(JavaThread* thread, address next_pc);
512 

408 
409   // A i2c adapter is simpler than the c2i adapter. This is because it is assumed
410   // that the interpreter before it does any call dispatch will record the current
411   // stack pointer in the interpreter frame. On return it will restore the stack
412   // pointer as needed. This means the i2c adapter code doesn't need any special
413   // handshaking path with compiled code to keep the stack walking correct.
414 
415   static AdapterHandlerEntry* generate_i2c2i_adapters(MacroAssembler *_masm,
416                                                       int total_args_passed,
417                                                       int max_arg,
418                                                       const BasicType *sig_bt,
419                                                       const VMRegPair *regs,
420                                                       AdapterFingerPrint* fingerprint);
421 
422   static void gen_i2c_adapter(MacroAssembler *_masm,
423                               int total_args_passed,
424                               int comp_args_on_stack,
425                               const BasicType *sig_bt,
426                               const VMRegPair *regs);
427 
428 
429   // OSR support
430 
431   // OSR_migration_begin will extract the jvm state from an interpreter
432   // frame (locals, monitors) and store the data in a piece of C heap
433   // storage. This then allows the interpreter frame to be removed from the
434   // stack and the OSR nmethod to be called. That method is called with a
435   // pointer to the C heap storage. This pointer is the return value from
436   // OSR_migration_begin.
437 
438   static intptr_t* OSR_migration_begin(JavaThread *thread);
439 
440   // OSR_migration_end is a trivial routine. It is called after the compiled
441   // method has extracted the jvm state from the C heap that OSR_migration_begin
442   // created. It's entire job is to simply free this storage.
443   static void OSR_migration_end(intptr_t* buf);
444 
445   // Convert a sig into a calling convention register layout
446   // and find interesting things about it.
447   static VMRegPair* find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int *arg_size);
448   static VMReg name_for_receiver();

474   // returns.
475   //
476   // The wrapper may contain special-case code if the given method
477   // is a JNI critical method, or a compiled method handle adapter,
478   // such as _invokeBasic, _linkToVirtual, etc.
479   static nmethod* generate_native_wrapper(MacroAssembler* masm,
480                                           const methodHandle& method,
481                                           int compile_id,
482                                           BasicType* sig_bt,
483                                           VMRegPair* regs,
484                                           BasicType ret_type,
485                                           address critical_entry);
486 
487   // A compiled caller has just called the interpreter, but compiled code
488   // exists.  Patch the caller so he no longer calls into the interpreter.
489   static void fixup_callers_callsite(Method* moop, address ret_pc);
490   static bool should_fixup_call_destination(address destination, address entry_point, address caller_pc, Method* moop, CodeBlob* cb);
491 
492   // Slow-path Locking and Unlocking
493   static void complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* current);
494   static void complete_monitor_locking_C_inc_held_monitor_count(oopDesc* obj, BasicLock* lock, JavaThread* current);
495   static void complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock, JavaThread* current);
496 
497   // Resolving of calls
498   static address resolve_static_call_C     (JavaThread* current);
499   static address resolve_virtual_call_C    (JavaThread* current);
500   static address resolve_opt_virtual_call_C(JavaThread* current);
501 
502   // arraycopy, the non-leaf version.  (See StubRoutines for all the leaf calls.)
503   static void slow_arraycopy_C(oopDesc* src,  jint src_pos,
504                                oopDesc* dest, jint dest_pos,
505                                jint length, JavaThread* thread);
506 
507   // handle ic miss with caller being compiled code
508   // wrong method handling (inline cache misses, zombie methods)
509   static address handle_wrong_method(JavaThread* current);
510   static address handle_wrong_method_abstract(JavaThread* current);
511   static address handle_wrong_method_ic_miss(JavaThread* current);
512 
513   static address handle_unsafe_access(JavaThread* thread, address next_pc);
514 
< prev index next >