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

David Holmes dholmes at openjdk.java.net
Wed May 4 23:18:30 UTC 2022


On Wed, 4 May 2022 18:29:22 GMT, Johan Sjölén <duke at openjdk.java.net> 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?

src/hotspot/share/logging/logTagSet.hpp line 168:

> 166: // tagset. This _tagset contains the configuration for those tags.
> 167: template <LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag>
> 168: LogTagSet LogTagSetMapping<T0, T1, T2, T3, T4, GuardTag>::_tagset{&LogPrefix<T0, T1, T2, T3, T4>::prefix, T0, T1, T2, T3, T4};

Is this a specialized initialization syntax? I'm not familiar with its significance.

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

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


More information about the hotspot-runtime-dev mailing list