RFR: 8286117: Remove unnecessary indirection and unused code in UL [v2]

Johan Sjölén duke at openjdk.java.net
Mon May 9 17:38:58 UTC 2022


On Mon, 9 May 2022 12:51:10 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> How about `LogTagSet& _tagset`? There are more examples of `_tagset` members in UL, so it's consistent.
>
> That seems a bit odd to me. Why can't we use the actual thing we will log to? The description of LogMessage is that it is a multi-part log entry that is accumulated until we flush it by writing to the actual log device.

This is the dependency-structure of UL before this PR (this PR moves the arrows into `LogImpl` directly into `LogTagSet`). `LogTagSet` knows what it logs to, because it has access to the `LogOutputList`, nothing else has such info (which is why every arrow goes into LogTagSet). This is why `LogMessage` doesn't know what it will flush to, `LogTagSet` redirects to the correct outputs.

![loggers](https://user-images.githubusercontent.com/103041674/167464762-80c6cd61-797a-4bd8-b7f3-609a8d95a0e7.png)

Circles = external API, rectangle = internal to UL.

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

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


More information about the hotspot-runtime-dev mailing list