< prev index next >

src/hotspot/share/runtime/sharedRuntime.hpp

Print this page

 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_RUNTIME_SHAREDRUNTIME_HPP
 26 #define SHARE_RUNTIME_SHAREDRUNTIME_HPP
 27 
 28 #include "classfile/compactHashtable.hpp"
 29 #include "code/codeBlob.hpp"
 30 #include "code/vmreg.hpp"
 31 #include "interpreter/linkResolver.hpp"
 32 #include "memory/allStatic.hpp"
 33 #include "memory/metaspaceClosure.hpp"
 34 #include "memory/resourceArea.hpp"
 35 #include "runtime/stubDeclarations.hpp"
 36 #include "utilities/macros.hpp"
 37 
 38 class AdapterHandlerEntry;
 39 class AdapterFingerPrint;
 40 class vframeStream;

 41 
 42 // Runtime is the base class for various runtime interfaces
 43 // (InterpreterRuntime, CompilerRuntime, etc.). It provides
 44 // shared functionality such as exception forwarding (C++ to
 45 // Java exceptions), locking/unlocking mechanisms, statistical
 46 // information, etc.
 47 
 48 // define SharedStubId enum tags: wrong_method_id, etc
 49 
 50 #define SHARED_STUB_ID_ENUM_DECLARE(name, type) STUB_ID_NAME(name),
 51 enum class SharedStubId :int {
 52   NO_STUBID = -1,
 53   SHARED_STUBS_DO(SHARED_STUB_ID_ENUM_DECLARE)
 54   NUM_STUBIDS
 55 };
 56 #undef SHARED_STUB_ID_ENUM_DECLARE
 57 
 58 class SharedRuntime: AllStatic {
 59  private:
 60   // Declare shared stub fields

271   }
272   static address get_resolve_virtual_call_stub() {
273     assert(_resolve_virtual_call_blob != nullptr, "oops");
274     return _resolve_virtual_call_blob->entry_point();
275   }
276   static address get_resolve_static_call_stub() {
277     assert(_resolve_static_call_blob != nullptr, "oops");
278     return _resolve_static_call_blob->entry_point();
279   }
280 
281   static SafepointBlob* polling_page_return_handler_blob()     { return _polling_page_return_handler_blob; }
282   static SafepointBlob* polling_page_safepoint_handler_blob()  { return _polling_page_safepoint_handler_blob; }
283   static SafepointBlob* polling_page_vectors_safepoint_handler_blob()  { return _polling_page_vectors_safepoint_handler_blob; }
284 
285   static nmethod* cont_doYield_stub() {
286     assert(_cont_doYield_stub != nullptr, "oops");
287     return _cont_doYield_stub;
288   }
289 
290   // Implicit exceptions
291   static address throw_AbstractMethodError_entry()          { return _throw_AbstractMethodError_blob->entry_point(); }
292   static address throw_IncompatibleClassChangeError_entry() { return _throw_IncompatibleClassChangeError_blob->entry_point(); }
293   static address throw_NullPointerException_at_call_entry() { return _throw_NullPointerException_at_call_blob->entry_point(); }
294   static address throw_StackOverflowError_entry()           { return _throw_StackOverflowError_blob->entry_point(); }
295   static address throw_delayed_StackOverflowError_entry()   { return _throw_delayed_StackOverflowError_blob->entry_point(); }















296 
297 #if INCLUDE_JFR
298   static address jfr_write_checkpoint() { return _jfr_write_checkpoint_blob->entry_point(); }
299   static address jfr_return_lease()     { return _jfr_return_lease_blob->entry_point(); }






300 #endif
301 
302   // Counters
303 #ifndef PRODUCT
304   static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
305 #endif // PRODUCT
306 
307   // Helper routine for full-speed JVMTI exception throwing support
308   static void throw_and_post_jvmti_exception(JavaThread* current, Handle h_exception);
309   static void throw_and_post_jvmti_exception(JavaThread* current, Symbol* name, const char *message = nullptr);
310 
311 #if INCLUDE_JVMTI
312   // Functions for JVMTI notifications
313   static void notify_jvmti_vthread_start(oopDesc* vt, jboolean hide, JavaThread* current);
314   static void notify_jvmti_vthread_end(oopDesc* vt, jboolean hide, JavaThread* current);
315   static void notify_jvmti_vthread_mount(oopDesc* vt, jboolean hide, JavaThread* current);
316   static void notify_jvmti_vthread_unmount(oopDesc* vt, jboolean hide, JavaThread* current);
317 #endif
318 
319   // RedefineClasses() tracing support for obsolete method entry

551 
552   // Resolving of calls
553   static address get_resolved_entry        (JavaThread* current, methodHandle callee_method);
554   static address resolve_static_call_C     (JavaThread* current);
555   static address resolve_virtual_call_C    (JavaThread* current);
556   static address resolve_opt_virtual_call_C(JavaThread* current);
557 
558   // arraycopy, the non-leaf version.  (See StubRoutines for all the leaf calls.)
559   static void slow_arraycopy_C(oopDesc* src,  jint src_pos,
560                                oopDesc* dest, jint dest_pos,
561                                jint length, JavaThread* thread);
562 
563   // handle ic miss with caller being compiled code
564   // wrong method handling (inline cache misses)
565   static address handle_wrong_method(JavaThread* current);
566   static address handle_wrong_method_abstract(JavaThread* current);
567   static address handle_wrong_method_ic_miss(JavaThread* current);
568 
569   static address handle_unsafe_access(JavaThread* thread, address next_pc);
570 















571 #ifndef PRODUCT
572 
573   // Collect and print inline cache miss statistics
574  private:
575   enum { maxICmiss_count = 100 };
576   static int     _ICmiss_index;                  // length of IC miss histogram
577   static int     _ICmiss_count[maxICmiss_count]; // miss counts
578   static address _ICmiss_at[maxICmiss_count];    // miss addresses
579   static void trace_ic_miss(address at);
580 
581  public:
582   static uint _ic_miss_ctr;                      // total # of IC misses
583   static uint _wrong_method_ctr;
584   static uint _resolve_static_ctr;
585   static uint _resolve_virtual_ctr;
586   static uint _resolve_opt_virtual_ctr;
587   static uint _implicit_null_throws;
588   static uint _implicit_div0_throws;
589 
590   static uint _jbyte_array_copy_ctr;       // Slow-path byte array copy
591   static uint _jshort_array_copy_ctr;      // Slow-path short array copy
592   static uint _jint_array_copy_ctr;        // Slow-path int array copy
593   static uint _jlong_array_copy_ctr;       // Slow-path long array copy
594   static uint _oop_array_copy_ctr;         // Slow-path oop array copy
595   static uint _checkcast_array_copy_ctr;   // Slow-path oop array copy, with cast
596   static uint _unsafe_array_copy_ctr;      // Slow-path includes alignment checks
597   static uint _generic_array_copy_ctr;     // Slow-path includes type decoding
598   static uint _slow_array_copy_ctr;        // Slow-path failed out to a method call
599 
600   static uint _unsafe_set_memory_ctr;      // Slow-path includes alignment checks
601 
602   static uint _new_instance_ctr;           // 'new' object requires GC
603   static uint _new_array_ctr;              // 'new' array requires GC
604   static uint _multi2_ctr, _multi3_ctr, _multi4_ctr, _multi5_ctr;
605   static uint _find_handler_ctr;           // find exception handler
606   static uint _rethrow_ctr;                // rethrow exception

610   static uint _mon_exit_ctr;               // monitor exit slow
611   static uint _partial_subtype_ctr;        // SubRoutines::partial_subtype_check
612 
613   // Statistics code
614   // stats for "normal" compiled calls (non-interface)
615   static int64_t _nof_normal_calls;               // total # of calls
616   static int64_t _nof_inlined_calls;              // total # of inlined normal calls
617   static int64_t _nof_static_calls;               // total # of calls to static methods or super methods (invokespecial)
618   static int64_t _nof_inlined_static_calls;       // total # of inlined static calls
619   // stats for compiled interface calls
620   static int64_t _nof_interface_calls;            // total # of compiled calls
621   static int64_t _nof_inlined_interface_calls;    // total # of inlined interface calls
622 
623  public: // for compiler
624   static address nof_normal_calls_addr()                { return (address)&_nof_normal_calls; }
625   static address nof_inlined_calls_addr()               { return (address)&_nof_inlined_calls; }
626   static address nof_static_calls_addr()                { return (address)&_nof_static_calls; }
627   static address nof_inlined_static_calls_addr()        { return (address)&_nof_inlined_static_calls; }
628   static address nof_interface_calls_addr()             { return (address)&_nof_interface_calls; }
629   static address nof_inlined_interface_calls_addr()     { return (address)&_nof_inlined_interface_calls; }
630   static void print_call_statistics(uint64_t comp_total);
631   static void print_ic_miss_histogram();
632 


633 #endif // PRODUCT
634 
635   static void print_statistics() PRODUCT_RETURN;
636 };
637 
638 
639 // ---------------------------------------------------------------------------
640 // Implementation of AdapterHandlerLibrary
641 //
642 // This library manages argument marshaling adapters and native wrappers.
643 // There are 2 flavors of adapters: I2C and C2I.
644 //
645 // The I2C flavor takes a stock interpreted call setup, marshals the
646 // arguments for a Java-compiled call, and jumps to Rmethod-> code()->
647 // code_begin().  It is broken to call it without an nmethod assigned.
648 // The usual behavior is to lift any register arguments up out of the
649 // stack and possibly re-pack the extra arguments to be contiguous.
650 // I2C adapters will save what the interpreter's stack pointer will be
651 // after arguments are popped, then adjust the interpreter's frame
652 // size to force alignment and possibly to repack the arguments.

694 
695   AdapterHandlerEntry(AdapterFingerPrint* fingerprint) :
696     _fingerprint(fingerprint),
697     _i2c_entry(nullptr),
698     _c2i_entry(nullptr),
699     _c2i_unverified_entry(nullptr),
700     _c2i_no_clinit_check_entry(nullptr),
701     _linked(false)
702 #ifdef ASSERT
703     , _saved_code(nullptr),
704     _saved_code_length(0)
705 #endif
706   { }
707 
708   ~AdapterHandlerEntry();
709 
710   // Allocate on CHeap instead of metaspace (see JDK-8331086).
711   // Dummy argument is used to avoid C++ warning about using
712   // deleted opearator MetaspaceObj::delete().
713   void* operator new(size_t size, size_t dummy) throw() {

714     void* p = AllocateHeap(size, mtCode);
715     memset(p, 0, size);
716     return p;
717   }
718 
719  public:
720   static AdapterHandlerEntry* allocate(AdapterFingerPrint* fingerprint) {
721     return new(0) AdapterHandlerEntry(fingerprint);
722   }
723 
724   static void deallocate(AdapterHandlerEntry *handler) {
725     handler->~AdapterHandlerEntry();
726   }
727 
728   void set_entry_points(address i2c_entry, address c2i_entry, address c2i_unverified_entry, address c2i_no_clinit_check_entry, bool linked = true) {
729     _i2c_entry = i2c_entry;
730     _c2i_entry = c2i_entry;
731     _c2i_unverified_entry = c2i_unverified_entry;
732     _c2i_no_clinit_check_entry = c2i_no_clinit_check_entry;
733     _linked = linked;

802   static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint);
803   static void create_native_wrapper(const methodHandle& method);
804   static AdapterHandlerEntry* get_adapter(const methodHandle& method);
805   static AdapterHandlerEntry* lookup(int total_args_passed, BasicType* sig_bt);
806   static bool generate_adapter_code(AdapterBlob*& adapter_blob,
807                                     AdapterHandlerEntry* handler,
808                                     int total_args_passed,
809                                     BasicType* sig_bt,
810                                     bool is_transient);
811 
812 #ifdef ASSERT
813   static void verify_adapter_sharing(int total_args_passed, BasicType* sig_bt, AdapterHandlerEntry* cached);
814 #endif // ASSERT
815 
816   static void print_handler(const CodeBlob* b) { print_handler_on(tty, b); }
817   static void print_handler_on(outputStream* st, const CodeBlob* b);
818   static bool contains(const CodeBlob* b);
819   static const char* name(AdapterFingerPrint* fingerprint);
820   static uint32_t id(AdapterFingerPrint* fingerprint);
821 #ifndef PRODUCT
822   static void print_statistics();
823 #endif // PRODUCT
824 
825   static bool is_abstract_method_adapter(AdapterHandlerEntry* adapter);
826 
827   static AdapterBlob* link_aot_adapter_handler(AdapterHandlerEntry* handler) NOT_CDS_RETURN_(nullptr);
828   static void dump_aot_adapter_table() NOT_CDS_RETURN;
829   static void serialize_shared_table_header(SerializeClosure* soc) NOT_CDS_RETURN;
830   static void link_aot_adapters() NOT_CDS_RETURN;
831 };
832 
833 #endif // SHARE_RUNTIME_SHAREDRUNTIME_HPP

 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_RUNTIME_SHAREDRUNTIME_HPP
 26 #define SHARE_RUNTIME_SHAREDRUNTIME_HPP
 27 
 28 #include "classfile/compactHashtable.hpp"
 29 #include "code/codeBlob.hpp"
 30 #include "code/vmreg.hpp"
 31 #include "interpreter/linkResolver.hpp"
 32 #include "memory/allStatic.hpp"
 33 #include "memory/metaspaceClosure.hpp"
 34 #include "memory/resourceArea.hpp"
 35 #include "runtime/stubDeclarations.hpp"
 36 #include "utilities/macros.hpp"
 37 
 38 class AdapterHandlerEntry;
 39 class AdapterFingerPrint;
 40 class vframeStream;
 41 class MetaspaceClosure;
 42 
 43 // Runtime is the base class for various runtime interfaces
 44 // (InterpreterRuntime, CompilerRuntime, etc.). It provides
 45 // shared functionality such as exception forwarding (C++ to
 46 // Java exceptions), locking/unlocking mechanisms, statistical
 47 // information, etc.
 48 
 49 // define SharedStubId enum tags: wrong_method_id, etc
 50 
 51 #define SHARED_STUB_ID_ENUM_DECLARE(name, type) STUB_ID_NAME(name),
 52 enum class SharedStubId :int {
 53   NO_STUBID = -1,
 54   SHARED_STUBS_DO(SHARED_STUB_ID_ENUM_DECLARE)
 55   NUM_STUBIDS
 56 };
 57 #undef SHARED_STUB_ID_ENUM_DECLARE
 58 
 59 class SharedRuntime: AllStatic {
 60  private:
 61   // Declare shared stub fields

272   }
273   static address get_resolve_virtual_call_stub() {
274     assert(_resolve_virtual_call_blob != nullptr, "oops");
275     return _resolve_virtual_call_blob->entry_point();
276   }
277   static address get_resolve_static_call_stub() {
278     assert(_resolve_static_call_blob != nullptr, "oops");
279     return _resolve_static_call_blob->entry_point();
280   }
281 
282   static SafepointBlob* polling_page_return_handler_blob()     { return _polling_page_return_handler_blob; }
283   static SafepointBlob* polling_page_safepoint_handler_blob()  { return _polling_page_safepoint_handler_blob; }
284   static SafepointBlob* polling_page_vectors_safepoint_handler_blob()  { return _polling_page_vectors_safepoint_handler_blob; }
285 
286   static nmethod* cont_doYield_stub() {
287     assert(_cont_doYield_stub != nullptr, "oops");
288     return _cont_doYield_stub;
289   }
290 
291   // Implicit exceptions
292   static address throw_AbstractMethodError_entry()          {
293     assert(_throw_AbstractMethodError_blob != nullptr, "");
294     return _throw_AbstractMethodError_blob->entry_point();
295   }
296   static address throw_IncompatibleClassChangeError_entry() {
297     assert(_throw_IncompatibleClassChangeError_blob != nullptr, "");
298     return  _throw_IncompatibleClassChangeError_blob->entry_point();
299   }
300   static address throw_NullPointerException_at_call_entry() {
301     assert(_throw_NullPointerException_at_call_blob != nullptr, "");
302     return  _throw_NullPointerException_at_call_blob->entry_point();
303   }
304   static address throw_StackOverflowError_entry()           {
305     assert(_throw_StackOverflowError_blob != nullptr, "");
306     return _throw_StackOverflowError_blob->entry_point();
307   }
308   static address throw_delayed_StackOverflowError_entry()   {
309     assert(_throw_delayed_StackOverflowError_blob != nullptr, "");
310     return _throw_delayed_StackOverflowError_blob->entry_point();
311   }
312 
313 #if INCLUDE_JFR
314   static address jfr_write_checkpoint() {
315     assert(_jfr_write_checkpoint_blob != nullptr, "");
316     return _jfr_write_checkpoint_blob->entry_point();
317   }
318   static address jfr_return_lease()     {
319     assert(_jfr_return_lease_blob != nullptr, "");
320     return _jfr_return_lease_blob->entry_point();
321   }
322 #endif
323 
324   // Counters
325 #ifndef PRODUCT
326   static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
327 #endif // PRODUCT
328 
329   // Helper routine for full-speed JVMTI exception throwing support
330   static void throw_and_post_jvmti_exception(JavaThread* current, Handle h_exception);
331   static void throw_and_post_jvmti_exception(JavaThread* current, Symbol* name, const char *message = nullptr);
332 
333 #if INCLUDE_JVMTI
334   // Functions for JVMTI notifications
335   static void notify_jvmti_vthread_start(oopDesc* vt, jboolean hide, JavaThread* current);
336   static void notify_jvmti_vthread_end(oopDesc* vt, jboolean hide, JavaThread* current);
337   static void notify_jvmti_vthread_mount(oopDesc* vt, jboolean hide, JavaThread* current);
338   static void notify_jvmti_vthread_unmount(oopDesc* vt, jboolean hide, JavaThread* current);
339 #endif
340 
341   // RedefineClasses() tracing support for obsolete method entry

573 
574   // Resolving of calls
575   static address get_resolved_entry        (JavaThread* current, methodHandle callee_method);
576   static address resolve_static_call_C     (JavaThread* current);
577   static address resolve_virtual_call_C    (JavaThread* current);
578   static address resolve_opt_virtual_call_C(JavaThread* current);
579 
580   // arraycopy, the non-leaf version.  (See StubRoutines for all the leaf calls.)
581   static void slow_arraycopy_C(oopDesc* src,  jint src_pos,
582                                oopDesc* dest, jint dest_pos,
583                                jint length, JavaThread* thread);
584 
585   // handle ic miss with caller being compiled code
586   // wrong method handling (inline cache misses)
587   static address handle_wrong_method(JavaThread* current);
588   static address handle_wrong_method_abstract(JavaThread* current);
589   static address handle_wrong_method_ic_miss(JavaThread* current);
590 
591   static address handle_unsafe_access(JavaThread* thread, address next_pc);
592 
593  private:
594   static PerfTickCounters* _perf_resolve_opt_virtual_total_time;
595   static PerfTickCounters* _perf_resolve_virtual_total_time;
596   static PerfTickCounters* _perf_resolve_static_total_time;
597   static PerfTickCounters* _perf_handle_wrong_method_total_time;
598   static PerfTickCounters* _perf_ic_miss_total_time;
599  public:
600   static uint _ic_miss_ctr;                      // total # of IC misses
601   static uint _wrong_method_ctr;
602   static uint _resolve_static_ctr;
603   static uint _resolve_virtual_ctr;
604   static uint _resolve_opt_virtual_ctr;
605 
606   static void print_counters_on(outputStream* st);
607 
608 #ifndef PRODUCT
609 
610   // Collect and print inline cache miss statistics
611  private:
612   enum { maxICmiss_count = 100 };
613   static int     _ICmiss_index;                  // length of IC miss histogram
614   static int     _ICmiss_count[maxICmiss_count]; // miss counts
615   static address _ICmiss_at[maxICmiss_count];    // miss addresses
616   static void trace_ic_miss(address at);
617 
618  public:





619   static uint _implicit_null_throws;
620   static uint _implicit_div0_throws;
621 
622   static uint _jbyte_array_copy_ctr;       // Slow-path byte array copy
623   static uint _jshort_array_copy_ctr;      // Slow-path short array copy
624   static uint _jint_array_copy_ctr;        // Slow-path int array copy
625   static uint _jlong_array_copy_ctr;       // Slow-path long array copy
626   static uint _oop_array_copy_ctr;         // Slow-path oop array copy
627   static uint _checkcast_array_copy_ctr;   // Slow-path oop array copy, with cast
628   static uint _unsafe_array_copy_ctr;      // Slow-path includes alignment checks
629   static uint _generic_array_copy_ctr;     // Slow-path includes type decoding
630   static uint _slow_array_copy_ctr;        // Slow-path failed out to a method call
631 
632   static uint _unsafe_set_memory_ctr;      // Slow-path includes alignment checks
633 
634   static uint _new_instance_ctr;           // 'new' object requires GC
635   static uint _new_array_ctr;              // 'new' array requires GC
636   static uint _multi2_ctr, _multi3_ctr, _multi4_ctr, _multi5_ctr;
637   static uint _find_handler_ctr;           // find exception handler
638   static uint _rethrow_ctr;                // rethrow exception

642   static uint _mon_exit_ctr;               // monitor exit slow
643   static uint _partial_subtype_ctr;        // SubRoutines::partial_subtype_check
644 
645   // Statistics code
646   // stats for "normal" compiled calls (non-interface)
647   static int64_t _nof_normal_calls;               // total # of calls
648   static int64_t _nof_inlined_calls;              // total # of inlined normal calls
649   static int64_t _nof_static_calls;               // total # of calls to static methods or super methods (invokespecial)
650   static int64_t _nof_inlined_static_calls;       // total # of inlined static calls
651   // stats for compiled interface calls
652   static int64_t _nof_interface_calls;            // total # of compiled calls
653   static int64_t _nof_inlined_interface_calls;    // total # of inlined interface calls
654 
655  public: // for compiler
656   static address nof_normal_calls_addr()                { return (address)&_nof_normal_calls; }
657   static address nof_inlined_calls_addr()               { return (address)&_nof_inlined_calls; }
658   static address nof_static_calls_addr()                { return (address)&_nof_static_calls; }
659   static address nof_inlined_static_calls_addr()        { return (address)&_nof_inlined_static_calls; }
660   static address nof_interface_calls_addr()             { return (address)&_nof_interface_calls; }
661   static address nof_inlined_interface_calls_addr()     { return (address)&_nof_inlined_interface_calls; }


662 
663   static void print_call_statistics_on(outputStream* st);
664   static void print_ic_miss_histogram_on(outputStream* st);
665 #endif // PRODUCT
666 
667   static void print_statistics() PRODUCT_RETURN;
668 };
669 
670 
671 // ---------------------------------------------------------------------------
672 // Implementation of AdapterHandlerLibrary
673 //
674 // This library manages argument marshaling adapters and native wrappers.
675 // There are 2 flavors of adapters: I2C and C2I.
676 //
677 // The I2C flavor takes a stock interpreted call setup, marshals the
678 // arguments for a Java-compiled call, and jumps to Rmethod-> code()->
679 // code_begin().  It is broken to call it without an nmethod assigned.
680 // The usual behavior is to lift any register arguments up out of the
681 // stack and possibly re-pack the extra arguments to be contiguous.
682 // I2C adapters will save what the interpreter's stack pointer will be
683 // after arguments are popped, then adjust the interpreter's frame
684 // size to force alignment and possibly to repack the arguments.

726 
727   AdapterHandlerEntry(AdapterFingerPrint* fingerprint) :
728     _fingerprint(fingerprint),
729     _i2c_entry(nullptr),
730     _c2i_entry(nullptr),
731     _c2i_unverified_entry(nullptr),
732     _c2i_no_clinit_check_entry(nullptr),
733     _linked(false)
734 #ifdef ASSERT
735     , _saved_code(nullptr),
736     _saved_code_length(0)
737 #endif
738   { }
739 
740   ~AdapterHandlerEntry();
741 
742   // Allocate on CHeap instead of metaspace (see JDK-8331086).
743   // Dummy argument is used to avoid C++ warning about using
744   // deleted opearator MetaspaceObj::delete().
745   void* operator new(size_t size, size_t dummy) throw() {
746     assert(size == BytesPerWord * heap_word_size(sizeof(AdapterHandlerEntry)), "should match");
747     void* p = AllocateHeap(size, mtCode);
748     memset(p, 0, size);
749     return p;
750   }
751 
752  public:
753   static AdapterHandlerEntry* allocate(AdapterFingerPrint* fingerprint) {
754     return new(0) AdapterHandlerEntry(fingerprint);
755   }
756 
757   static void deallocate(AdapterHandlerEntry *handler) {
758     handler->~AdapterHandlerEntry();
759   }
760 
761   void set_entry_points(address i2c_entry, address c2i_entry, address c2i_unverified_entry, address c2i_no_clinit_check_entry, bool linked = true) {
762     _i2c_entry = i2c_entry;
763     _c2i_entry = c2i_entry;
764     _c2i_unverified_entry = c2i_unverified_entry;
765     _c2i_no_clinit_check_entry = c2i_no_clinit_check_entry;
766     _linked = linked;

835   static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint);
836   static void create_native_wrapper(const methodHandle& method);
837   static AdapterHandlerEntry* get_adapter(const methodHandle& method);
838   static AdapterHandlerEntry* lookup(int total_args_passed, BasicType* sig_bt);
839   static bool generate_adapter_code(AdapterBlob*& adapter_blob,
840                                     AdapterHandlerEntry* handler,
841                                     int total_args_passed,
842                                     BasicType* sig_bt,
843                                     bool is_transient);
844 
845 #ifdef ASSERT
846   static void verify_adapter_sharing(int total_args_passed, BasicType* sig_bt, AdapterHandlerEntry* cached);
847 #endif // ASSERT
848 
849   static void print_handler(const CodeBlob* b) { print_handler_on(tty, b); }
850   static void print_handler_on(outputStream* st, const CodeBlob* b);
851   static bool contains(const CodeBlob* b);
852   static const char* name(AdapterFingerPrint* fingerprint);
853   static uint32_t id(AdapterFingerPrint* fingerprint);
854 #ifndef PRODUCT
855   static void print_statistics_on(outputStream* st);
856 #endif // PRODUCT
857 
858   static bool is_abstract_method_adapter(AdapterHandlerEntry* adapter);
859 
860   static AdapterBlob* link_aot_adapter_handler(AdapterHandlerEntry* handler) NOT_CDS_RETURN_(nullptr);
861   static void dump_aot_adapter_table() NOT_CDS_RETURN;
862   static void serialize_shared_table_header(SerializeClosure* soc) NOT_CDS_RETURN;
863   static void link_aot_adapters() NOT_CDS_RETURN;
864 };
865 
866 #endif // SHARE_RUNTIME_SHAREDRUNTIME_HPP
< prev index next >