RFR: 8311976: Inconsistency in usage of CITimeVerbose to generate compilation logs
Ashutosh Mehra
duke at openjdk.org
Thu Jul 13 22:44:48 UTC 2023
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
-------------
Commit messages:
- 8311976: Inconsistency in usage of CITimeVerbose to generate compilation logs
Changes: https://git.openjdk.org/jdk/pull/14880/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14880&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8311976
Stats: 39 lines in 4 files changed: 3 ins; 19 del; 17 mod
Patch: https://git.openjdk.org/jdk/pull/14880.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14880/head:pull/14880
PR: https://git.openjdk.org/jdk/pull/14880
More information about the hotspot-dev
mailing list