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

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

XMLWordPrintable

    • b24

      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

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

              Created:
              Updated:
              Resolved: