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

Xin Liu xliu at openjdk.java.net
Wed May 19 18:21:55 UTC 2021


On Thu, 13 May 2021 06:34:48 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix build on Windows.
>>   
>>   It seems that headers on Windows define WAIT_TIMEOUT somewhere. rename it.
>
> src/hotspot/share/logging/logAsyncFlusher.cpp line 106:
> 
>> 104: 
>> 105:   log_info(logging)("The maximum entries of AsyncLogBuffer: " SIZE_FORMAT ", estimated memory use: " SIZE_FORMAT " bytes",
>> 106:                     _buffer_max_size, AsyncLogBufferSize);
> 
> nit: how about "Asynchronous logging enabled. Buffer size: xxx entries"?

I change the logic a little bit. 
at this point we can't say "Asynchronous logging enabled", we need to make sure:
1. asynclog Thread is ready.
2. _instance is non-null.
3. all active readers(synchronous logsites) are completed. 

I emit a sentence later. 
[0.036s][27407][debug][logging,thread   ] AsyncLogging starts working.

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

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


More information about the hotspot-dev mailing list