RFR: 8344014: Simplify TracePhase constructor

Thomas Stuefe stuefe at openjdk.org
Tue Nov 12 13:50:15 UTC 2024


On Tue, 12 Nov 2024 07:56:24 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> 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.

Mac OS error unrelated.

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

PR Comment: https://git.openjdk.org/jdk/pull/22029#issuecomment-2470568530


More information about the hotspot-compiler-dev mailing list