RFR: 8344014: Simplify TracePhase constructor
Thomas Stuefe
stuefe at openjdk.org
Tue Nov 12 13:50:15 UTC 2024
As a prerequisite for [JDK-8344009](https://bugs.openjdk.org/browse/JDK-8344009), `TracePhase` constructor needs to know the PhaseTraceId. And while we are at it, it can be simplified: trace strings can be kept in via x-macro with the IDs, and it is sufficient to pass in the IDs, no need to pass the pointer to the counters since we use the same counters anyway.
Since this is a somewhat invasive but purely mechanical change, I separate this work from [JDK-8344009](https://bugs.openjdk.org/browse/JDK-8344009).
There are no functional changes. Trace texts have been faithfully taken over, even in the case where the original TracePhase constructor invocation got fed an empty string (`_t_vector` and `_t_renumberLive`) - whether this was intentional or not, this patch does not change it.
The patch preserves the possibility to override the phase name with an explicit argument to the constructor. This is used in one existing case ("computeLive (sbplr)"), again, to faithfully preserve the log format.
Test: I checked manually with +CITimeVerbose with and without patch and compared the output; output format is preserved.
-------------
Commit messages:
- fixes
- Rework TracePhase construction
Changes: https://git.openjdk.org/jdk/pull/22029/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22029&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8344014
Stats: 199 lines in 18 files changed: 75 ins; 53 del; 71 mod
Patch: https://git.openjdk.org/jdk/pull/22029.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22029/head:pull/22029
PR: https://git.openjdk.org/jdk/pull/22029
More information about the hotspot-compiler-dev
mailing list