RFR: 8311976: Inconsistency in usage of CITimeVerbose to generate compilation logs

Vladimir Kozlov kvn at openjdk.org
Thu Jul 13 23:10:16 UTC 2023


On Thu, 13 Jul 2023 22:35:43 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

> Please review this PR for controlling timing information of C1 compilation phases using CITimeVerbose option, same as for C2 compilations.
> I also took this opportunity to fix some other minor issues with logging:
> 1. The PhaseTraceTime object should be constructed after setting the compiler data as PhaseTraceTime constructor calls `Compilation::current()`. For this reason I moved the statement `PhaseTraceTime timeit(_t_compile)` after the call to `_env->set_compiler_data(this);`.
> 2. Previous step also allowed to remove the nullptr check for `Compilation::current()` in PhaseTraceTime constructor.
> 3. I noticed the call to ComileLog->done() only prints `phase_done` tag and ignores all other parameters passed to it. This was due to a bug in `xmlStream::va_done` which is also fixed in here.
> 4. Remove unnecessary statements in TracePhase destructor as the object already has the fields computed in the constructor.
> 5. Some bikeshedding like TimerName -> TimerId and TracePhase::C -> TracePhase::_compile
> 
> I felt these are all minor fixes so I clubbed them together. here If it feel inappropriate I can pull them in their own PRs.
> 
> Testing: GHA testing passed

@ashu-mehra, can you show output before and after this changes? It would be nice to see what you are fixing.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14880#issuecomment-1635039351


More information about the hotspot-dev mailing list