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

Provide time consumed in each compilation phase in the logs

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 22
    • hotspot

    Description

      Recently I came across an issue for which I wanted to check the compilation time for each phase of C2 compilation. LogCompilation with CITimeVerbose provided me the timestamp of each phase, but that time corresponds to the elapsed time which is not the same as the time taken by the compiler thread to complete the phase.
      I think it would be a useful addition to log the absolute time taken by the compiler thread for each phase.
      Currently the "phase_done" tag in the logs includes a timestamp. I think the time consumed can also be provided along with the timestamp in that tag, as in:

      <phase name="computeLive" nodes="13697" live="13572" stamp="31.871">
            <phase_done stamp="31.883" time_taken="5ms"/>
      </phase>

      To determine time_taken we can use existing APIs os::current_thread_cpu_time()/os::thread_cpu_time() can be used.

      Attachments

        Activity

          People

            asmehra Ashutosh Mehra
            asmehra Ashutosh Mehra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: