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

Nashorn chokes compilers with large methods

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Future Project
    • Affects Version/s: 10
    • Fix Version/s: tbd_minor
    • Component/s: core-libs
    • Labels:
      None

      Description

      This is in relation to JDK-8059234. If we instrument C1 NCE and run Nashorn/Octane benchmark suite, and then sort the methods by compile time, we can then observe this:
       http://cr.openjdk.java.net/~shade/8059235/nashorn-c1-nce.log.gz

      The last lines there are most interesting:
       34662 1541.935 ms, 11911 blocks: Done with null check elimination for method jdk/nashorn/internal/scripts/Script$Recompilation$2839$768791A$mandreel::_ZN16btCollisionWorld18addCollisionObjectEP17btCollisionObjectss(Ljdk/nashorn/internal/runtime/ScriptFunction;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

      That is, a sample method took 1.5 seconds to do the a single phase in C1; and that is because it is a mammoth method with almost 12K basic blocks. While we can address the issue partially within JDK-8059234, Nashorn really needs to split the work into smaller methods to play nicely with JITs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hannesw Hannes Wallnoefer
                Reporter:
                shade Aleksey Shipilev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: