< prev index next >

src/hotspot/share/runtime/sharedRuntime.hpp

Print this page

        

*** 28,44 **** --- 28,46 ---- #include "interpreter/bytecodeHistogram.hpp" #include "interpreter/bytecodeTracer.hpp" #include "interpreter/linkResolver.hpp" #include "memory/allocation.hpp" #include "memory/resourceArea.hpp" + #include "runtime/signature.hpp" #include "utilities/hashtable.hpp" #include "utilities/macros.hpp" class AdapterHandlerEntry; class AdapterHandlerTable; class AdapterFingerPrint; class vframeStream; + class SigEntry; // Runtime is the base class for various runtime interfaces // (InterpreterRuntime, CompilerRuntime, etc.). It provides // shared functionality such as exception forwarding (C++ to // Java exceptions), locking/unlocking mechanisms, statistical
*** 82,92 **** private: enum { POLL_AT_RETURN, POLL_AT_LOOP, POLL_AT_VECTOR_LOOP }; static SafepointBlob* generate_handler_blob(address call_ptr, int poll_type); static RuntimeStub* generate_resolve_blob(address destination, const char* name); ! public: static void generate_stubs(void); // max bytes for each dtrace string parameter enum { max_dtrace_string_size = 256 }; --- 84,94 ---- private: enum { POLL_AT_RETURN, POLL_AT_LOOP, POLL_AT_VECTOR_LOOP }; static SafepointBlob* generate_handler_blob(address call_ptr, int poll_type); static RuntimeStub* generate_resolve_blob(address destination, const char* name); ! static RuntimeStub* generate_return_value_blob(address destination, const char* name); public: static void generate_stubs(void); // max bytes for each dtrace string parameter enum { max_dtrace_string_size = 256 };
*** 327,347 **** // deopt blob static void generate_deopt_blob(void); static bool handle_ic_miss_helper_internal(Handle receiver, CompiledMethod* caller_nm, const frame& caller_frame, methodHandle callee_method, Bytecodes::Code bc, CallInfo& call_info, ! bool& needs_ic_stub_refill, TRAPS); public: static DeoptimizationBlob* deopt_blob(void) { return _deopt_blob; } // Resets a call-site in compiled code so it will get resolved again. ! static methodHandle reresolve_call_site(JavaThread *thread, TRAPS); // In the code prolog, if the klass comparison fails, the inline cache // misses and the call site is patched to megamorphic ! static methodHandle handle_ic_miss_helper(JavaThread* thread, TRAPS); // Find the method that called us. static methodHandle find_callee_method(JavaThread* thread, TRAPS); --- 329,349 ---- // deopt blob static void generate_deopt_blob(void); static bool handle_ic_miss_helper_internal(Handle receiver, CompiledMethod* caller_nm, const frame& caller_frame, methodHandle callee_method, Bytecodes::Code bc, CallInfo& call_info, ! bool& needs_ic_stub_refill, bool& is_optimized, TRAPS); public: static DeoptimizationBlob* deopt_blob(void) { return _deopt_blob; } // Resets a call-site in compiled code so it will get resolved again. ! static methodHandle reresolve_call_site(JavaThread *thread, bool& is_optimized, TRAPS); // In the code prolog, if the klass comparison fails, the inline cache // misses and the call site is patched to megamorphic ! static methodHandle handle_ic_miss_helper(JavaThread* thread, bool& is_optimized, TRAPS); // Find the method that called us. static methodHandle find_callee_method(JavaThread* thread, TRAPS);
*** 376,385 **** --- 378,395 ---- // 4-bytes higher. So for sparc because the register window save area is at // the bottom of the frame the first 16 words will be skipped and SharedInfo::stack0 // will be just above it. ( // return value is the maximum number of VMReg stack slots the convention will use. static int java_calling_convention(const BasicType* sig_bt, VMRegPair* regs, int total_args_passed, int is_outgoing); + static int java_calling_convention(const GrowableArray<SigEntry>* sig, VMRegPair* regs) { + BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sig->length()); + int total_args_passed = SigEntry::fill_sig_bt(sig, sig_bt); + return java_calling_convention(sig_bt, regs, total_args_passed, false); + } + static int java_return_convention(const BasicType* sig_bt, VMRegPair* regs, int total_args_passed); + static const uint java_return_convention_max_int; + static const uint java_return_convention_max_float; static void check_member_name_argument_is_last_argument(const methodHandle& method, const BasicType* sig_bt, const VMRegPair* regs) NOT_DEBUG_RETURN;
*** 423,443 **** // that the interpreter before it does any call dispatch will record the current // stack pointer in the interpreter frame. On return it will restore the stack // pointer as needed. This means the i2c adapter code doesn't need any special // handshaking path with compiled code to keep the stack walking correct. ! static AdapterHandlerEntry* generate_i2c2i_adapters(MacroAssembler *_masm, ! int total_args_passed, ! int max_arg, ! const BasicType *sig_bt, ! const VMRegPair *regs, ! AdapterFingerPrint* fingerprint); static void gen_i2c_adapter(MacroAssembler *_masm, - int total_args_passed, int comp_args_on_stack, ! const BasicType *sig_bt, const VMRegPair *regs); // OSR support // OSR_migration_begin will extract the jvm state from an interpreter --- 433,457 ---- // that the interpreter before it does any call dispatch will record the current // stack pointer in the interpreter frame. On return it will restore the stack // pointer as needed. This means the i2c adapter code doesn't need any special // handshaking path with compiled code to keep the stack walking correct. ! static AdapterHandlerEntry* generate_i2c2i_adapters(MacroAssembler *masm, ! int comp_args_on_stack, ! int comp_args_on_stack_cc, ! const GrowableArray<SigEntry>* sig, ! const VMRegPair* regs, ! const GrowableArray<SigEntry>* sig_cc, ! const VMRegPair* regs_cc, ! const GrowableArray<SigEntry>* sig_cc_ro, ! const VMRegPair* regs_cc_ro, ! AdapterFingerPrint* fingerprint, ! AdapterBlob*& new_adapter); static void gen_i2c_adapter(MacroAssembler *_masm, int comp_args_on_stack, ! const GrowableArray<SigEntry>* sig, const VMRegPair *regs); // OSR support // OSR_migration_begin will extract the jvm state from an interpreter
*** 509,531 **** --- 523,551 ---- // Resolving of calls static address resolve_static_call_C (JavaThread *thread); static address resolve_virtual_call_C (JavaThread *thread); static address resolve_opt_virtual_call_C(JavaThread *thread); + static void load_value_type_fields_in_regs(JavaThread *thread, oopDesc* res); + static void store_value_type_fields_to_buf(JavaThread *thread, intptr_t res); + // arraycopy, the non-leaf version. (See StubRoutines for all the leaf calls.) static void slow_arraycopy_C(oopDesc* src, jint src_pos, oopDesc* dest, jint dest_pos, jint length, JavaThread* thread); // handle ic miss with caller being compiled code // wrong method handling (inline cache misses, zombie methods) static address handle_wrong_method(JavaThread* thread); static address handle_wrong_method_abstract(JavaThread* thread); static address handle_wrong_method_ic_miss(JavaThread* thread); + static void allocate_value_types(JavaThread* thread, Method* callee, bool allocate_receiver); + static void apply_post_barriers(JavaThread* thread, objArrayOopDesc* array); static address handle_unsafe_access(JavaThread* thread, address next_pc); + static BufferedValueTypeBlob* generate_buffered_value_type_adapter(const ValueKlass* vk); #ifndef PRODUCT // Collect and print inline cache miss statistics private: enum { maxICmiss_count = 100 };
*** 636,659 **** private: AdapterFingerPrint* _fingerprint; address _i2c_entry; address _c2i_entry; address _c2i_unverified_entry; #ifdef ASSERT // Captures code and signature used to generate this adapter when // verifying adapter equivalence. unsigned char* _saved_code; int _saved_code_length; #endif ! void init(AdapterFingerPrint* fingerprint, address i2c_entry, address c2i_entry, address c2i_unverified_entry) { _fingerprint = fingerprint; _i2c_entry = i2c_entry; _c2i_entry = c2i_entry; _c2i_unverified_entry = c2i_unverified_entry; #ifdef ASSERT _saved_code = NULL; _saved_code_length = 0; #endif } --- 656,687 ---- private: AdapterFingerPrint* _fingerprint; address _i2c_entry; address _c2i_entry; + address _c2i_value_entry; + address _c2i_value_ro_entry; address _c2i_unverified_entry; + // Support for scalarized value type calling convention + const GrowableArray<SigEntry>* _sig_cc; + #ifdef ASSERT // Captures code and signature used to generate this adapter when // verifying adapter equivalence. unsigned char* _saved_code; int _saved_code_length; #endif ! void init(AdapterFingerPrint* fingerprint, address i2c_entry, address c2i_entry, address c2i_value_entry, address c2i_value_ro_entry, address c2i_unverified_entry) { _fingerprint = fingerprint; _i2c_entry = i2c_entry; _c2i_entry = c2i_entry; + _c2i_value_entry = c2i_value_entry; + _c2i_value_ro_entry = c2i_value_ro_entry; _c2i_unverified_entry = c2i_unverified_entry; + _sig_cc = NULL; #ifdef ASSERT _saved_code = NULL; _saved_code_length = 0; #endif }
*** 664,677 **** --- 692,711 ---- AdapterHandlerEntry(); public: address get_i2c_entry() const { return _i2c_entry; } address get_c2i_entry() const { return _c2i_entry; } + address get_c2i_value_entry() const { return _c2i_value_entry; } + address get_c2i_value_ro_entry() const { return _c2i_value_ro_entry; } address get_c2i_unverified_entry() const { return _c2i_unverified_entry; } address base_address(); void relocate(address new_base); + // Support for scalarized value type calling convention + void set_sig_cc(const GrowableArray<SigEntry>* sig) { _sig_cc = sig; } + const GrowableArray<SigEntry>* get_sig_cc() const { return _sig_cc; } + AdapterFingerPrint* fingerprint() const { return _fingerprint; } AdapterHandlerEntry* next() { return (AdapterHandlerEntry*)BasicHashtableEntry<mtCode>::next(); }
*** 710,720 **** static AdapterHandlerEntry* get_adapter0(const methodHandle& method); public: static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, ! address i2c_entry, address c2i_entry, address c2i_unverified_entry); static void create_native_wrapper(const methodHandle& method); static AdapterHandlerEntry* get_adapter(const methodHandle& method); static void print_handler(const CodeBlob* b) { print_handler_on(tty, b); } static void print_handler_on(outputStream* st, const CodeBlob* b); --- 744,754 ---- static AdapterHandlerEntry* get_adapter0(const methodHandle& method); public: static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, ! address i2c_entry, address c2i_entry, address c2i_value_entry, address c2i_value_ro_entry, address c2i_unverified_entry); static void create_native_wrapper(const methodHandle& method); static AdapterHandlerEntry* get_adapter(const methodHandle& method); static void print_handler(const CodeBlob* b) { print_handler_on(tty, b); } static void print_handler_on(outputStream* st, const CodeBlob* b);
< prev index next >