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

"Total compile time" counter should include time spent in failing/bailout compiles

XMLWordPrintable

    • b05

        Noticed this when looking through JMH compiler profiler results.

        Current `CompilerBroker` counters that are fed into `CompilationMXBean.getTotalCompilationTime()` and JFR `CompilerStatistics` only records the time for successful compilations. If we take a while in compilation and then fail/bail, that time would not be accounted for.

        While this seems to be a long-standing behavior, there are problems with this:
         1. This is not what "total" means.
         2. This gives us a blind spot in measuring time taken in failing/bailing compilations.
         3. It does not match well the Javadoc for the bean: "Returns the approximate accumulated elapsed time (in milliseconds) spent in compilation." -- since the time spent in failing/bailing compilation is still time spent in compilation.

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: