RFR: 8286117: Remove unnecessary indirection and unused code in UL

Johan Sjölén duke at openjdk.java.net
Thu May 5 07:01:19 UTC 2022


On Wed, 4 May 2022 23:11:52 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> This PR cleans up some minor annoyances in the UL code.
>> 
>> Note that the change from `LogImpl` to `LogTagSet` is equivalent, we're essentially inlining the calls that `LogImpl` would have made. This simplifies understanding ("why do we need `LogImpl` here?" was my question, answer: We don't!)'
>
> src/hotspot/share/logging/logMessage.hpp line 65:
> 
>> 63: class LogMessageImpl : public LogMessageBuffer {
>> 64:  private:
>> 65:   LogImpl<T0, T1, T2, T3, T4, GuardTag> _log;
> 
> I'm not very familiar with the detailed internals here, but don't we need this to capture the Log "state" and ensure it is always the same when used for this LogMessageImpl - otherwise can't `LogTagSetMapping<T0, T1, T2, T3, T4, GuardTag>::tagset()` change what it returns over time?

See my comment to Ioi for a more detailed explanation, but in short: No. The template parameters uniquely identify a specific tagset. The tagsets themselves are mutated in place, to accomodate for new outputs and altered decorations, for example.

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

PR: https://git.openjdk.java.net/jdk/pull/8541


More information about the hotspot-runtime-dev mailing list