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

Multiple 'call site target change' bailouts take significant amount of total compilation time

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9, 10, 11, 12, 13
    • Fix Version/s: tbd
    • Component/s: hotspot

      Description

      If you run Nashorn/Octane with:

      jdk-jdk/test/nashorn $ ~/trunks/jdk-jdk/build/linux-x86_64-server-release/images/jdk/bin/java -XX:+CITime -jar ~/Install/jdk8u191-rh/jre/lib/ext/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time script/basic/run-octane.js -- --iterations 1

      ....and this simple instrumentation patch:
       http://cr.openjdk.java.net/~shade/8058941/bailout-stat.patch

      ...then you will see we waste lots of compilations on final dependency checks before installing the nmethod:
       http://cr.openjdk.java.net/~shade/8058941/nashorn-octane.txt

        Bailout reasons:
          51.680 secs: CodeBuffer overflow
           1.492 secs: too many stack slots used
          94.501 secs: call site target change <---- !!!
           0.861 secs: concurrent class loading

      I think we need to consider faster bailouts. Vladimir Ivanov speculated the underlying issue is about compiling the
      CallSite targets when CS targets actively mutate: by the time we finish the compilation, the target is already invalid.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                shade Aleksey Shipilev
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: