RFR: 8229517: Support for optional asynchronous/buffered logging

Xin Liu xliu at openjdk.java.net
Tue May 25 05:51:13 UTC 2021


On Tue, 25 May 2021 05:25:40 GMT, David Holmes <david.holmes at oracle.com> wrote:

> I'm not sure what that means as I only expect there to be one timestamp.
I'm just not sure if it is recording the time at which the log call was
made, or the time (later) when that log record was actually written out?

Sorry. I updated the answer today. Let me elaborate it. Current implementation uses the original timestamps, which are accurate. When I create AsyncLogMessage instance, I copy _decorations. 
@tstuefe recently compressed that class. 

> Using what applications and logging settings?

My observation is based on my integration test. Current semaphore-based synchronization can catch up the pace of gclog=trace.
https://github.com/openjdk/jdk/pull/3135#issuecomment-827135465

> If the buffer is nearly always empty and so it is very unlikely that the
final flush will have much, if anything to do, then arguably you don't
need the io_sem complexity.

_io_sem is introduced to pass unified logging test in async mode. I just enable them.
https://github.com/openjdk/jdk/pull/3135/commits/2ffc33feaf5757bc5744440278e7750a9f2b81bf

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

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


More information about the hotspot-dev mailing list