RFR: 8267517: async logging for stdout and stderr [v3]

Xin Liu xliu at openjdk.java.net
Tue Dec 21 19:30:17 UTC 2021


On Tue, 21 Dec 2021 02:39:02 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix typo and the building eror on MacOS.
>
> src/hotspot/share/logging/logAsyncWriter.cpp line 154:
> 
>> 152:     assert(req == 1, "AsyncLogWriter::flush() is NOT MT-safe!");
>> 153:     // LogFileOutput::write_block() has called fflush().
>> 154:     // stderr does not cache.
> 
> cache? Do you mean "buffer"?

`buffer` is the right word.LogFileOut::write_block() has called fflush() to flush all file-based streams.
LogStdoutOutput/LogFileStreamOutput haven't because of `LogFileStreamOutput::write_blocking()`. 

stderr is unbuffered, so I think we only need to flush stdout here.

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

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


More information about the hotspot-runtime-dev mailing list