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

StringConcat MH_INLINE_SIZED_EXACT should skip storage initialization

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b112

      Description

      MH_INLINE_SIZED_EXACT strategy is known to win in many cases where OptimizeStringConcat does not work, but it is penalized when OptimizeStringConcat does work:
       http://cr.openjdk.java.net/~shade/8150463/perf-bad.txt

      "perfasm" profiling shows this is because MH_INLINE_SIZED_EXACT has to allocate the underlying storage from Java, which requires zeroing; while C2 is able to avoid zeroing altogether, because it knows the array would get overwritten completely:
        http://cr.openjdk.java.net/~shade/8150463/BC_SB.perfasm
        http://cr.openjdk.java.net/~shade/8150463/MH_INLINE_SIZED_EXACT.perfasm

      We need to solve this before switching to most optimal concat strategy.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: