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

C1 profiling handles statically bindable call sites differently than the interpreter

    Details

    • Subcomponent:
    • Resolved In Build:
      b31

      Description

      While investigating performance anomalies I noticed some odd looking profiles. For instance

      12 invokevirtual 22 <java/lang/Integer.intValue()I>
        112 bci: 12 VirtualCallData count(3397) nonprofiled_count(0) entries(1)
                                          'java/lang/Integer'(80597 0.96)

      35 invokevirtual 31 <java/lang/String.startsWith(Ljava/lang/String;)Z>
        152 bci: 35 VirtualCallData count(449) nonprofiled_count(0) entries(1)
                                          'java/lang/String'(15482 0.97)

      These are all call sites where the resolved method for the invoke can_be_statically_bound. In the interpreter this uses profile_final_call which always just updates the counter and doesn't bother to update the profile. C1 still uses the normal type profile logic for these sites which leads to the funny looking profiles. C1 profiled code would probably execute a bit faster if it handled call sites like the interpreter and the profiles would be consistent. Presumably no one really cares about the profiles of call sites which are statically bindable but it's somewhat surprising that they look different than regular calls.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iveresov Igor Veresov
                Reporter:
                never Tom Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: