-
Enhancement
-
Resolution: Unresolved
-
P4
-
22
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.
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.