Request For Comment: Asynchronous Logging

Yasumasa Suenaga suenaga at oss.nttdata.com
Thu Apr 29 07:55:46 UTC 2021


Hi,

The CSR looks good to me.
Thank you for the update!


Yasumasa


2021-04-29 15:19 に Liu, Xin さんは書きました:
> hi, Yasumsa,
> 
> I have updated the CSR to reflect the latest discussion. To simplify
> implementation and user interface, we decide to have only one global
> option. A global flag -Xlog:async set the asynclogging mode for all log
> outputs, before and after -Xlog:async.
> 
> According to my test, with default size of buffer, All log tagsets can
> write asynchronously and I hardly observe the buffer overflows. Another
> argument is that we don't think it's a very common the end-users need 
> to
> define different outputs with different async properties.
> 
> Please note that it is supposed to include stdout/stderr streams if
> -Xlog:async is set. pull/3135 only supports LogFileOutput. I will 
> create
> a JBS issue and hoist the current logics to LogFileStreamOutput, which
> includes stdout/stderr as well.
> 
> 
> thanks,
> --lx
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 4/27/21 4:35 PM, Yasumasa Suenaga wrote:
>> CAUTION: This email originated from outside of the organization. Do 
>> not
> click links or open attachments unless you can confirm the sender and
> know the content is safe.
>> 
>> 
>> 
>> Hi Xin,
>> 
>> On 2021/04/28 2:17, Liu, Xin wrote:
>>> Hi,
>>> 
>>> I would like to report my current progress. I have finished all 
>>> pending
>>> tasks except "hoist async_mode to base class for stdout/err". May I 
>>> ask
>>> to defer it after this PR? I will create an issue and work on it
>>> immediately after this PR.  It's not difficult but I need to modify 
>>> the
>>> existing interfaces. I would like to keep this PR almost "added" to 
>>> ease
>>> reviewers.
>>> 
>>> If Yasumasa allows me to do so, now the only blocker is CSR. it seems
>>> that Iom and Thomas agree with a global option. Shall we go that way?
>> 
>> I agree with you, but I'm not clear a bit between "async=" in -Xlog 
>> and -XX:+AsyncLogging.
>> 
>> CSR says about them in below, but I think they are not same because 
>> -XX:AsyncLogging affects global, on the other hand "async=" affects in 
>> each log output. Is it right?
>> 
>> -----
>> Unified Logging framework can define a global option 
>> -Xlog:async[=true|false]. The effect is same as -XX:+/-AsyncLogging
>> -----
>> 
>> 
>> Thanks,
>> 
>> Yasumasa
>> 
>> 
>>> Meanwhile, I have pushed all my code to github:
>>> https://github.com/openjdk/jdk/pull/3135
>>> 
>>> Could you take a look it?
>>> 
>>> -------------------------------------------------------------
>>> | request                                      | Status     |
>>> -------------------------------------------------------------
>>> | independent NonJavaThread                    | done       |
>>> |-----------------------------------------------------------|
>>> | pass tier1-test with +AsyncLogging           |  [1]       |
>>> |-----------------------------------------------------------|
>>> | inject meta-info to display no. of dropping msg. | done   |
>>> |-----------------------------------------------------------|
>>> | support jcmd VM.log                          |  done      |
>>> |-----------------------------------------------------------|
>>> | preserve accurate decorations                |            |
>>> |-----------------------------------------------------------<- 
>>> progress
>>> | hoist async_mode to base class for stdout/err|            |
>>> |-----------------------------------------------------------|
>>> | CSR                                          |JDK-8264323 |
>>> |-----------------------------------------------------------<- 
>>> consensus
>>> |use string table over malloc                  |            |
>>> ------------------------------------------------------------|
>>> |use lock-free data structure.                 |            |
>>> -------------------------------------------------------------
>>> 
>>> 
>>> [1] the only exception is serviceability/dcmd/gc/RunGCTest.java. it
>>> emits gclog and checks result right away without any synchronization. 
>>> if
>>> we do run jtreg test with async logging, I need to add an flushing 
>>> api
>>> in whitebox.
>>> 
>>> 
>>> thanks,
>>> --lx
>>> 


More information about the hotspot-dev mailing list