< prev index next >

src/hotspot/cpu/s390/interp_masm_s390.cpp

Print this page

1740         Address mdo_arg_addr(mdp, in_bytes(TypeEntriesAtCall::argument_type_offset(i))-off_to_args);
1741         profile_obj_type(tmp, mdo_arg_addr, tmp, /*ltg did compare to 0*/ true);
1742 
1743         int to_add = in_bytes(TypeStackSlotEntries::per_arg_size());
1744         add2reg(mdp, to_add);
1745         off_to_args += to_add;
1746       }
1747 
1748       if (MethodData::profile_return()) {
1749         z_lg(tmp, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, mdp);
1750         add2reg(tmp, -TypeProfileArgsLimit*TypeStackSlotEntries::per_arg_count());
1751       }
1752 
1753       bind(done);
1754 
1755       if (MethodData::profile_return()) {
1756         // We're right after the type profile for the last
1757         // argument. Tmp is the number of cells left in the
1758         // CallTypeData/VirtualCallTypeData to reach its end. Non null
1759         // if there's a return to profile.
1760         assert(ReturnTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
1761         z_sllg(tmp, tmp, exact_log2(DataLayout::cell_size));
1762         z_agr(mdp, tmp);
1763       }
1764       z_stg(mdp, _z_ijava_state_neg(mdx), Z_fp);
1765     } else {
1766       assert(MethodData::profile_return(), "either profile call args or call ret");
1767       update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
1768     }
1769 
1770     // Mdp points right after the end of the
1771     // CallTypeData/VirtualCallTypeData, right after the cells for the
1772     // return value type if there's one.
1773     bind(profile_continue);
1774   }
1775 }
1776 
1777 void InterpreterMacroAssembler::profile_return_type(Register mdp, Register ret, Register tmp) {
1778   assert_different_registers(mdp, ret, tmp);
1779   if (ProfileInterpreter && MethodData::profile_return()) {
1780     Label profile_continue;

1789       // length.
1790       NearLabel do_profile;
1791       Address bc(Z_bcp);
1792       z_lb(tmp, bc);
1793       compare32_and_branch(tmp, Bytecodes::_invokedynamic, Assembler::bcondEqual, do_profile);
1794       compare32_and_branch(tmp, Bytecodes::_invokehandle, Assembler::bcondEqual, do_profile);
1795       get_method(tmp);
1796       // Supplement to 8139891: _intrinsic_id exceeded 1-byte size limit.
1797       if (Method::intrinsic_id_size_in_bytes() == 1) {
1798         z_cli(Method::intrinsic_id_offset_in_bytes(), tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1799       } else {
1800         assert(Method::intrinsic_id_size_in_bytes() == 2, "size error: check Method::_intrinsic_id");
1801         z_lh(tmp, Method::intrinsic_id_offset_in_bytes(), Z_R0, tmp);
1802         z_chi(tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1803       }
1804       z_brne(profile_continue);
1805 
1806       bind(do_profile);
1807     }
1808 
1809     Address mdo_ret_addr(mdp, -in_bytes(ReturnTypeEntry::size()));
1810     profile_obj_type(ret, mdo_ret_addr, tmp);
1811 
1812     bind(profile_continue);
1813   }
1814 }
1815 
1816 void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
1817   if (ProfileInterpreter && MethodData::profile_parameters()) {
1818     Label profile_continue, done;
1819 
1820     test_method_data_pointer(mdp, profile_continue);
1821 
1822     // Load the offset of the area within the MDO used for
1823     // parameters. If it's negative we're not profiling any parameters.
1824     Address parm_di_addr(mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset()));
1825     load_and_test_int2long(tmp1, parm_di_addr);
1826     z_brl(profile_continue);
1827 
1828     // Compute a pointer to the area for parameters from the offset
1829     // and move the pointer to the slot for the last

1740         Address mdo_arg_addr(mdp, in_bytes(TypeEntriesAtCall::argument_type_offset(i))-off_to_args);
1741         profile_obj_type(tmp, mdo_arg_addr, tmp, /*ltg did compare to 0*/ true);
1742 
1743         int to_add = in_bytes(TypeStackSlotEntries::per_arg_size());
1744         add2reg(mdp, to_add);
1745         off_to_args += to_add;
1746       }
1747 
1748       if (MethodData::profile_return()) {
1749         z_lg(tmp, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, mdp);
1750         add2reg(tmp, -TypeProfileArgsLimit*TypeStackSlotEntries::per_arg_count());
1751       }
1752 
1753       bind(done);
1754 
1755       if (MethodData::profile_return()) {
1756         // We're right after the type profile for the last
1757         // argument. Tmp is the number of cells left in the
1758         // CallTypeData/VirtualCallTypeData to reach its end. Non null
1759         // if there's a return to profile.
1760         assert(SingleTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
1761         z_sllg(tmp, tmp, exact_log2(DataLayout::cell_size));
1762         z_agr(mdp, tmp);
1763       }
1764       z_stg(mdp, _z_ijava_state_neg(mdx), Z_fp);
1765     } else {
1766       assert(MethodData::profile_return(), "either profile call args or call ret");
1767       update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
1768     }
1769 
1770     // Mdp points right after the end of the
1771     // CallTypeData/VirtualCallTypeData, right after the cells for the
1772     // return value type if there's one.
1773     bind(profile_continue);
1774   }
1775 }
1776 
1777 void InterpreterMacroAssembler::profile_return_type(Register mdp, Register ret, Register tmp) {
1778   assert_different_registers(mdp, ret, tmp);
1779   if (ProfileInterpreter && MethodData::profile_return()) {
1780     Label profile_continue;

1789       // length.
1790       NearLabel do_profile;
1791       Address bc(Z_bcp);
1792       z_lb(tmp, bc);
1793       compare32_and_branch(tmp, Bytecodes::_invokedynamic, Assembler::bcondEqual, do_profile);
1794       compare32_and_branch(tmp, Bytecodes::_invokehandle, Assembler::bcondEqual, do_profile);
1795       get_method(tmp);
1796       // Supplement to 8139891: _intrinsic_id exceeded 1-byte size limit.
1797       if (Method::intrinsic_id_size_in_bytes() == 1) {
1798         z_cli(Method::intrinsic_id_offset_in_bytes(), tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1799       } else {
1800         assert(Method::intrinsic_id_size_in_bytes() == 2, "size error: check Method::_intrinsic_id");
1801         z_lh(tmp, Method::intrinsic_id_offset_in_bytes(), Z_R0, tmp);
1802         z_chi(tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1803       }
1804       z_brne(profile_continue);
1805 
1806       bind(do_profile);
1807     }
1808 
1809     Address mdo_ret_addr(mdp, -in_bytes(SingleTypeEntry::size()));
1810     profile_obj_type(ret, mdo_ret_addr, tmp);
1811 
1812     bind(profile_continue);
1813   }
1814 }
1815 
1816 void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
1817   if (ProfileInterpreter && MethodData::profile_parameters()) {
1818     Label profile_continue, done;
1819 
1820     test_method_data_pointer(mdp, profile_continue);
1821 
1822     // Load the offset of the area within the MDO used for
1823     // parameters. If it's negative we're not profiling any parameters.
1824     Address parm_di_addr(mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset()));
1825     load_and_test_int2long(tmp1, parm_di_addr);
1826     z_brl(profile_continue);
1827 
1828     // Compute a pointer to the area for parameters from the offset
1829     // and move the pointer to the slot for the last
< prev index next >