1737 bind(do_profile);
1738 }
1739
1740 Address mdo_ret_addr(mdp, -in_bytes(ReturnTypeEntry::size()));
1741 mov(tmp, ret);
1742 profile_obj_type(tmp, mdo_ret_addr);
1743
1744 bind(profile_continue);
1745 }
1746 }
1747
1748 void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
1749 if (ProfileInterpreter && MethodData::profile_parameters()) {
1750 Label profile_continue, done;
1751
1752 test_method_data_pointer(mdp, profile_continue);
1753
1754 // Load the offset of the area within the MDO used for
1755 // parameters. If it's negative we're not profiling any parameters
1756 ldr(tmp1, Address(mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset())));
1757 cmp(tmp1, 0u);
1758 br(Assembler::LT, profile_continue);
1759
1760 // Compute a pointer to the area for parameters from the offset
1761 // and move the pointer to the slot for the last
1762 // parameters. Collect profiling from last parameter down.
1763 // mdo start + parameters offset + array length - 1
1764 add(mdp, mdp, tmp1);
1765 ldr(tmp1, Address(mdp, ArrayData::array_len_offset()));
1766 sub(tmp1, tmp1, TypeStackSlotEntries::per_arg_count());
1767
1768 Label loop;
1769 bind(loop);
1770
1771 int off_base = in_bytes(ParametersTypeData::stack_slot_offset(0));
1772 int type_base = in_bytes(ParametersTypeData::type_offset(0));
1773 int per_arg_scale = exact_log2(DataLayout::cell_size);
1774 add(rscratch1, mdp, off_base);
1775 add(rscratch2, mdp, type_base);
1776
1777 Address arg_off(rscratch1, tmp1, Address::lsl(per_arg_scale));
1778 Address arg_type(rscratch2, tmp1, Address::lsl(per_arg_scale));
|
1737 bind(do_profile);
1738 }
1739
1740 Address mdo_ret_addr(mdp, -in_bytes(ReturnTypeEntry::size()));
1741 mov(tmp, ret);
1742 profile_obj_type(tmp, mdo_ret_addr);
1743
1744 bind(profile_continue);
1745 }
1746 }
1747
1748 void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
1749 if (ProfileInterpreter && MethodData::profile_parameters()) {
1750 Label profile_continue, done;
1751
1752 test_method_data_pointer(mdp, profile_continue);
1753
1754 // Load the offset of the area within the MDO used for
1755 // parameters. If it's negative we're not profiling any parameters
1756 ldr(tmp1, Address(mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset())));
1757 tbnz(tmp1, 63, profile_continue); // i.e. sign bit set
1758
1759 // Compute a pointer to the area for parameters from the offset
1760 // and move the pointer to the slot for the last
1761 // parameters. Collect profiling from last parameter down.
1762 // mdo start + parameters offset + array length - 1
1763 add(mdp, mdp, tmp1);
1764 ldr(tmp1, Address(mdp, ArrayData::array_len_offset()));
1765 sub(tmp1, tmp1, TypeStackSlotEntries::per_arg_count());
1766
1767 Label loop;
1768 bind(loop);
1769
1770 int off_base = in_bytes(ParametersTypeData::stack_slot_offset(0));
1771 int type_base = in_bytes(ParametersTypeData::type_offset(0));
1772 int per_arg_scale = exact_log2(DataLayout::cell_size);
1773 add(rscratch1, mdp, off_base);
1774 add(rscratch2, mdp, type_base);
1775
1776 Address arg_off(rscratch1, tmp1, Address::lsl(per_arg_scale));
1777 Address arg_type(rscratch2, tmp1, Address::lsl(per_arg_scale));
|