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

David Holmes dholmes at openjdk.java.net
Mon May 9 01:21:40 UTC 2022


On Thu, 5 May 2022 06:58:16 GMT, Johan Sjölén <duke at openjdk.java.net> wrote:

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

So really `_log` is just a simple alias that makes the other code easier to read IMO. So can't we keep `_log` and change the type?

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

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


More information about the hotspot-runtime-dev mailing list