RFR: 8229517: Support for optional asynchronous/buffered logging [v12]

Xin Liu xliu at openjdk.java.net
Fri May 7 08:13:53 UTC 2021


On Fri, 7 May 2021 06:13:19 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> This patch provides a buffer to store asynchrounous messages and flush them to
>> underlying files periodically.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change option AsyncLogBufferEntries to AsyncLogBufferSize.
>   
>   AsyncLogBufferSize is the memory budget in bytes for Asynchronous Logging.
>   User can specify it in shorthand form. eg. -XX:AsyncLogBufferSize=10M.

src/hotspot/share/logging/logFileOutput.cpp line 312:

> 310:   if (flusher != NULL) {
> 311:     flusher->enqueue(*this, decorations, msg);
> 312:     return 0;

should return -1 here. be consistent with `write(LogMessageBuffer::Iterator msg_iterator)` below.

src/hotspot/share/logging/logFileOutput.hpp line 41:

> 39:   static const char* const FileCountOptionKey;
> 40:   static const char* const FileSizeOptionKey;
> 41:   static const char* const AsyncOptionKey;

this is deprecated!

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

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


More information about the hotspot-dev mailing list