RFR: 8286180: Enable construction of LogStreamImpl from LogMessageImpl [v5]
Johan Sjölén
duke at openjdk.java.net
Wed May 18 15:10:07 UTC 2022
> May I please have a review of this PR which adds non-interleaving log streams to UL?
>
> In `LogMessageImpl` I remove templates and instead directly store a reference to `LogTagSet` and change `LogTagHandle` to be consistent (from pointer to reference) with `LogMessageImpl`.
>
> Adding a non-interleaving log stream enables UL to replace two patterns found in HotSpot:
>
> 1. `ttyLocker` + `(x)tty`
> Instead of taking the global tty lock in order to ensure non-interleaving logs we can now make a `NonInterleavingLogstream` and pass that around to various `print_on(outputStream*)` functions.
>
> 2. `stringStream` + `outputStream*`
> In order to avoid taking the lock and being able to take arbitrary output streams a `stringStream` is created and finally printed through `print_raw(ss.as_string())`. This however requires a `ResourceMark`, which `NonInterleavingLogStream` does not require.
>
> Passes tier 1.
Johan Sjölén has updated the pull request incrementally with three additional commits since the last revision:
- Use unary not instead of comparing to false
- Sort includes
- Style changes
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8748/files
- new: https://git.openjdk.java.net/jdk/pull/8748/files/13e1cca2..c04e06be
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8748&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8748&range=03-04
Stats: 39 lines in 2 files changed: 15 ins; 8 del; 16 mod
Patch: https://git.openjdk.java.net/jdk/pull/8748.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8748/head:pull/8748
PR: https://git.openjdk.java.net/jdk/pull/8748
More information about the hotspot-runtime-dev
mailing list