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

Xin Liu xliu at openjdk.java.net
Sat May 22 08:44:08 UTC 2021


On Fri, 21 May 2021 05:32:57 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update according to reviewer's feedback.
>
> src/hotspot/share/runtime/globals.hpp line 1995:
> 
>> 1993:           "Memory budget(in bytes) for the buffer of Asynchronous "         \
>> 1994:           "Logging (-Xlog:async).")                                         \
>> 1995:           range(100*K, 50*M)                                                \
> 
> What is the basis for this range?

The range is a pair of empirical values. 

2*M can guarantee that it won't drop any gclog in trace verbosity. 

100k is just a fraction of memory and 50M is a wild guess. I have never seen any log dropped with 50m budget in any program. 

If we don't set a up-bound, the user can tweak it and the buffer will be effectively unbounded. That will change our the design and may cause undefined behaviors. eg. allocation may fail,  the semaphore _sem may overflow etc.

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

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


More information about the hotspot-dev mailing list