< prev index next >

src/hotspot/cpu/s390/interp_masm_s390.cpp

Print this page

1633         Address mdo_arg_addr(mdp, in_bytes(TypeEntriesAtCall::argument_type_offset(i))-off_to_args);
1634         profile_obj_type(tmp, mdo_arg_addr, tmp, /*ltg did compare to 0*/ true);
1635 
1636         int to_add = in_bytes(TypeStackSlotEntries::per_arg_size());
1637         add2reg(mdp, to_add);
1638         off_to_args += to_add;
1639       }
1640 
1641       if (MethodData::profile_return()) {
1642         z_lg(tmp, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, mdp);
1643         add2reg(tmp, -TypeProfileArgsLimit*TypeStackSlotEntries::per_arg_count());
1644       }
1645 
1646       bind(done);
1647 
1648       if (MethodData::profile_return()) {
1649         // We're right after the type profile for the last
1650         // argument. Tmp is the number of cells left in the
1651         // CallTypeData/VirtualCallTypeData to reach its end. Non null
1652         // if there's a return to profile.
1653         assert(ReturnTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
1654         z_sllg(tmp, tmp, exact_log2(DataLayout::cell_size));
1655         z_agr(mdp, tmp);
1656       }
1657       z_stg(mdp, _z_ijava_state_neg(mdx), Z_fp);
1658     } else {
1659       assert(MethodData::profile_return(), "either profile call args or call ret");
1660       update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
1661     }
1662 
1663     // Mdp points right after the end of the
1664     // CallTypeData/VirtualCallTypeData, right after the cells for the
1665     // return value type if there's one.
1666     bind(profile_continue);
1667   }
1668 }
1669 
1670 void InterpreterMacroAssembler::profile_return_type(Register mdp, Register ret, Register tmp) {
1671   assert_different_registers(mdp, ret, tmp);
1672   if (ProfileInterpreter && MethodData::profile_return()) {
1673     Label profile_continue;

1682       // length.
1683       NearLabel do_profile;
1684       Address bc(Z_bcp);
1685       z_lb(tmp, bc);
1686       compare32_and_branch(tmp, Bytecodes::_invokedynamic, Assembler::bcondEqual, do_profile);
1687       compare32_and_branch(tmp, Bytecodes::_invokehandle, Assembler::bcondEqual, do_profile);
1688       get_method(tmp);
1689       // Supplement to 8139891: _intrinsic_id exceeded 1-byte size limit.
1690       if (Method::intrinsic_id_size_in_bytes() == 1) {
1691         z_cli(in_bytes(Method::intrinsic_id_offset()), tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1692       } else {
1693         assert(Method::intrinsic_id_size_in_bytes() == 2, "size error: check Method::_intrinsic_id");
1694         z_lh(tmp, in_bytes(Method::intrinsic_id_offset()), Z_R0, tmp);
1695         z_chi(tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1696       }
1697       z_brne(profile_continue);
1698 
1699       bind(do_profile);
1700     }
1701 
1702     Address mdo_ret_addr(mdp, -in_bytes(ReturnTypeEntry::size()));
1703     profile_obj_type(ret, mdo_ret_addr, tmp);
1704 
1705     bind(profile_continue);
1706   }
1707 }
1708 
1709 void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
1710   if (ProfileInterpreter && MethodData::profile_parameters()) {
1711     Label profile_continue, done;
1712 
1713     test_method_data_pointer(mdp, profile_continue);
1714 
1715     // Load the offset of the area within the MDO used for
1716     // parameters. If it's negative we're not profiling any parameters.
1717     Address parm_di_addr(mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset()));
1718     load_and_test_int2long(tmp1, parm_di_addr);
1719     z_brl(profile_continue);
1720 
1721     // Compute a pointer to the area for parameters from the offset
1722     // and move the pointer to the slot for the last

1633         Address mdo_arg_addr(mdp, in_bytes(TypeEntriesAtCall::argument_type_offset(i))-off_to_args);
1634         profile_obj_type(tmp, mdo_arg_addr, tmp, /*ltg did compare to 0*/ true);
1635 
1636         int to_add = in_bytes(TypeStackSlotEntries::per_arg_size());
1637         add2reg(mdp, to_add);
1638         off_to_args += to_add;
1639       }
1640 
1641       if (MethodData::profile_return()) {
1642         z_lg(tmp, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, mdp);
1643         add2reg(tmp, -TypeProfileArgsLimit*TypeStackSlotEntries::per_arg_count());
1644       }
1645 
1646       bind(done);
1647 
1648       if (MethodData::profile_return()) {
1649         // We're right after the type profile for the last
1650         // argument. Tmp is the number of cells left in the
1651         // CallTypeData/VirtualCallTypeData to reach its end. Non null
1652         // if there's a return to profile.
1653         assert(SingleTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
1654         z_sllg(tmp, tmp, exact_log2(DataLayout::cell_size));
1655         z_agr(mdp, tmp);
1656       }
1657       z_stg(mdp, _z_ijava_state_neg(mdx), Z_fp);
1658     } else {
1659       assert(MethodData::profile_return(), "either profile call args or call ret");
1660       update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
1661     }
1662 
1663     // Mdp points right after the end of the
1664     // CallTypeData/VirtualCallTypeData, right after the cells for the
1665     // return value type if there's one.
1666     bind(profile_continue);
1667   }
1668 }
1669 
1670 void InterpreterMacroAssembler::profile_return_type(Register mdp, Register ret, Register tmp) {
1671   assert_different_registers(mdp, ret, tmp);
1672   if (ProfileInterpreter && MethodData::profile_return()) {
1673     Label profile_continue;

1682       // length.
1683       NearLabel do_profile;
1684       Address bc(Z_bcp);
1685       z_lb(tmp, bc);
1686       compare32_and_branch(tmp, Bytecodes::_invokedynamic, Assembler::bcondEqual, do_profile);
1687       compare32_and_branch(tmp, Bytecodes::_invokehandle, Assembler::bcondEqual, do_profile);
1688       get_method(tmp);
1689       // Supplement to 8139891: _intrinsic_id exceeded 1-byte size limit.
1690       if (Method::intrinsic_id_size_in_bytes() == 1) {
1691         z_cli(in_bytes(Method::intrinsic_id_offset()), tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1692       } else {
1693         assert(Method::intrinsic_id_size_in_bytes() == 2, "size error: check Method::_intrinsic_id");
1694         z_lh(tmp, in_bytes(Method::intrinsic_id_offset()), Z_R0, tmp);
1695         z_chi(tmp, static_cast<int>(vmIntrinsics::_compiledLambdaForm));
1696       }
1697       z_brne(profile_continue);
1698 
1699       bind(do_profile);
1700     }
1701 
1702     Address mdo_ret_addr(mdp, -in_bytes(SingleTypeEntry::size()));
1703     profile_obj_type(ret, mdo_ret_addr, tmp);
1704 
1705     bind(profile_continue);
1706   }
1707 }
1708 
1709 void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
1710   if (ProfileInterpreter && MethodData::profile_parameters()) {
1711     Label profile_continue, done;
1712 
1713     test_method_data_pointer(mdp, profile_continue);
1714 
1715     // Load the offset of the area within the MDO used for
1716     // parameters. If it's negative we're not profiling any parameters.
1717     Address parm_di_addr(mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset()));
1718     load_and_test_int2long(tmp1, parm_di_addr);
1719     z_brl(profile_continue);
1720 
1721     // Compute a pointer to the area for parameters from the offset
1722     // and move the pointer to the slot for the last
< prev index next >