RFR: 8229517: Support for optional asynchronous/buffered logging
Xin Liu
xliu at openjdk.java.net
Fri Mar 26 19:08:28 UTC 2021
On Fri, 26 Mar 2021 08:37:41 GMT, Volker Simonis <simonis at openjdk.org> wrote:
>> Yes, it's part of CSR.
>>
>> I think it is prefer to set `async` to false by default because it should be treated same with `file` / `filecount` / `filesize` on the logger. The user should add `async=true` to the logger what the user want to set to.
>
> Agreed. No need for an extra option. Handle it like other logging framework defaults (e.g. `DefaultFileCount` or `DefaultFileSize`)
>
> You also have to check that `LogAsyncInterval` is zero modulo 10 otherwise you'll get:
> $ ./images/jdk/bin/java -XX:LogAsyncInterval=13 -Xlog:gc:file=/tmp/class.log::async=true -version
> # To suppress the following error report, specify this argument
> # after -XX: or in .hotspotrc: SuppressErrorAt=/task.cpp:73
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # Internal Error (/priv/simonisv/OpenJDK/Git/jdk/src/hotspot/share/runtime/task.cpp:73), pid=21168, tid=21169
> # assert(_interval >= PeriodicTask::min_interval && _interval % PeriodicTask::interval_gran == 0) failed: improper PeriodicTask interval time
> #
> # JRE version: (17.0) (slowdebug build )
> # Java VM: OpenJDK 64-Bit Server VM (slowdebug 17-internal+0-adhoc.simonisv.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
> # Problematic frame:
> # V [libjvm.so+0x1244301] PeriodicTask::PeriodicTask(unsigned long)+0x83
> #
> # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
> #
> # An error report file with more information is saved as:
> # /priv/simonisv/output/jdk-dbg/hs_err_pid21168.log
> #
> #
> Aborted
oh, I don't know this constraint. I will add a constraint check for the option.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3135
More information about the hotspot-dev
mailing list