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

Xin Liu xliu at openjdk.java.net
Fri Apr 9 08:38:06 UTC 2021


On Fri, 26 Mar 2021 08:47:04 GMT, Volker Simonis <simonis at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - fix runtime/logging/RedefineClasses.java crashed with -XX:+AsyncLogging
>>    
>>    nmethod::print(outputStream* st) should not obtain tty_lock by assuming
>>    st is defaultStream. It could be logStream as well.
>>    
>>    Currently, AyncLogFlusher::_lock has the same rank of tty_lock.
>>    https://issues.amazon.com/issues/JVM-563
>>  - 8229517: Support for optional asynchronous/buffered logging
>>    
>>    Move LogAsyncFlusher from WatcherThread to a standalone NonJavaThread
>>    https://issues.amazon.com/issues/JVM-565
>>  - 8229517: Support for optional asynchronous/buffered logging
>>    
>>    re-introduce the global option AsyncLogging.
>
> src/hotspot/share/logging/logFileOutput.cpp line 50:
> 
>> 48:     : LogFileStreamOutput(NULL), _name(os::strdup_check_oom(name, mtLogging)),
>> 49:       _file_name(NULL), _archive_name(NULL), _current_file(0),
>> 50:       _file_count(DefaultFileCount), _is_default_file_count(true), _async_mode(AsyncLogging), _archive_name_len(0),
> 
> See comments on `globals.hpp`. No need for an extra option. Make this `false` by default.
> 
> And can you please also add the `_async_mode` to the following log trace in `LogFileOutput::initialize()`:
>   log_trace(logging)("Initializing logging to file '%s' (filecount: %u"
>                      ", filesize: " SIZE_FORMAT " KiB).",
> _file_name, _file_count, _rotate_size / K);

ack. I will add some log_traces for asynclogflusher and this.

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

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


More information about the hotspot-dev mailing list