Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8233466

aarch64: remove unnecessary load of mdo when profiling return and parameters type

    Details

    • Subcomponent:
    • Resolved In Build:
      b26
    • CPU:
      aarch64
    • OS:
      generic

      Backports

        Description

        When profiling return and parameters type from the interpreter on aarch64 platform, 'mdp' is loaded by test_method_data_pointer which is called by profile_return_type & profile_parameters_type.

        It's not necessary to load mdo before calling __ profile_return_type or __ profile_parameters_type.

        Patch:

        diff --git a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
        --- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
        +++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
        @@ -444,7 +444,6 @@
             Register obj = r0;
             Register mdp = r1;
             Register tmp = r2;
        - __ ldr(mdp, Address(rmethod, Method::method_data_offset()));
             __ profile_return_type(mdp, obj, tmp);
           }
         
        @@ -1634,13 +1633,8 @@
           __ mov(rscratch2, true);
           __ strb(rscratch2, do_not_unlock_if_synchronized);
         
        - Label no_mdp;
           Register mdp = r3;
        - __ ldr(mdp, Address(rmethod, Method::method_data_offset()));
        - __ cbz(mdp, no_mdp);
        - __ add(mdp, mdp, in_bytes(MethodData::data_offset()));
           __ profile_parameters_type(mdp, r1, r2);
        - __ bind(no_mdp);
         
           // increment invocation count & check for overflow
           Label invocation_counter_overflow;

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  fyang Fei Yang
                  Reporter:
                  fyang Fei Yang
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: