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

C2: Inlining should not depend on absolute call site counts

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b13

      Description

      C2 considers absolute call site counts in its inlining decisions, which seems very wrong considering the asynchronous nature of profiling and background compilation (See InlineTree::should_inline()). It causes substantial over-inlining, which in presence of a depth-first inlining can lead to an early cut off. It also is inherently unstable. C2 already uses call frequency as an additional factor and it's better to consider only that in the inlining heuristic. I did extensive benchmarking it yielded almost no losses and single-digit wins (up to 5%) on some benchmarks. I think it's safe to remove/deprecate InlineFrequencyCount and continue using InlineFrequencyRatio instead. I found that converting the frequency computation to FP and setting InlineFrequencyRatio=0.25 (inline a method that is called a least 25% of the time) works best.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iveresov Igor Veresov
              Reporter:
              iveresov Igor Veresov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: