Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8323807

Async UL: Add a stalling mode to async UL

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot

      Today, asynchronous UL depends on off-loading the work of logging to output devices by having log sites copying messages onto a buffer and an output thread swapping it with an empty buffer and emptying it. If the current buffer runs out of room, then any attempt at logging leads to the message being dropped, that is: The message is not printed at all. I'd like to suggest that we add a stalling mode to async UL where in no message dropping occurs and all log sites stall until there is sufficient room in the buffer for their respective message.

      I imagine that the user facing change for async UL would be to equip -Xlog:async with an option, as such:

      ```
      $ java -Xlog:async:drop ... # Drop messages
      $ java -Xlog:async:stall ... # Stall log sites
      $ java -Xlog:async ... # Drop messages by default
      ```

      This can be implemented by slightly altering the protocol for the producer threads and the consumer threads, whilst retaining the current ping-pong buffer implementation.

            jsjolen Johan Sjölen
            jsjolen Johan Sjölen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: