RFR: 8229517: Support for optional asynchronous/buffered logging

Xin Liu xliu at openjdk.java.net
Thu Mar 25 19:04:29 UTC 2021


On Thu, 25 Mar 2021 12:21:41 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> This patch provides a buffer to store asynchrounous messages and flush them to
>> underlying files periodically.
>
> src/hotspot/share/runtime/globals.hpp line 2033:
> 
>> 2031:           "Milliseconds between asynchronous log flushing")                 \
>> 2032:                                                                             \
>> 2033:   product(bool, AsyncLogging, false,                                        \
> 
> I think this option is not needed - `async` should be set to `false` by default, and we should control it through `-Xlog` option like other log output options (e.g. `filecount`).

It's possible that a Java process have multiple file-based outputs. A global option `AsyncLogging` can set them all Otherwise, developers have to set async=true individually. It's part of CSR, right?

> src/hotspot/share/runtime/globals.hpp line 2036:
> 
>> 2034:           "Enble asynchronous GC logging")                                  \
>> 2035:                                                                             \
>> 2036:   product(size_t, GCLogBufferSize, 2*K,                                     \
> 
> This PR is for UL, not only GC log. So it should be renamed.

ack. I will rename it AsyncLogBufferSize.

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

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


More information about the hotspot-dev mailing list