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

JFR: Reduce logging in ChunkHeader constructor

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • None
    • hotspot
    • None
    • jfr
    • b18

      When a ChunkHeader object is constructed, it reads the chunk header information, for example the metadata position, and writes it to the log:

      long c = input.readRawLong(); // chunk size
      Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Chunk: chunkSize=" + c);
      ...

      This is legacy from when JFR didin't support streaming. Today, the header is read reliably after inspecting the FILE_STATE in the refresh() method and then logged.

      This means the same information is written twice, and potentially incorrect the first time. It makes sense to remove the unreliable logging to reduce noice and avoid confusion.

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: