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

C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 9, 10, 11, 12, 13, 14, 15, 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Environment:

      The issue affects all LP64 platforms.

    • Subcomponent:
    • Resolved In Build:
      b24

      Description

      The execution time and memory consumption of ConvI2LNode::Ideal() grows exponentially in programs with AddI operation chains followed by an int-to-long conversion. This seems to be due to the ConvI2L(AddI(x, y)) to AddL(ConvI2L(x), ConvI2L(y)) conversion growing exponentially with the length of AddI operation chains. This behavior can be seen in the attached plot. Beyond n = 24, the JVM exhausts the main memory (32 GB) and is killed.

      To reproduce the (preliminary) measurements shown in the plot, run the following on the attached TestReduced.java.orig:

      for n in {1..25}; do echo "$n" && cat TestReduced.java.orig | sed "s/N/$n/g" > TestReduced.java && java -Xcomp -XX:-TieredCompilation -XX:CompileOnly=TestReduced -XX:+CITime TestReduced.java | grep IdealLoop | grep -v "0,000"; done

        Attachments

        1. compilation-time.png
          22 kB
          Roberto Castaneda Lozano
        2. TestReduced.java.orig
          0.3 kB
          Roberto Castaneda Lozano

          Issue Links

            Activity

              People

              Assignee:
              rcastanedalo Roberto Castaneda Lozano
              Reporter:
              rcastanedalo Roberto Castaneda Lozano
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: