Review Request: JMC-5922: Adding support for JDK9 and later for the chunk splitter.

Marcus Hirt marcus.hirt at
Mon May 21 20:27:35 UTC 2018

I just realized that the byte sizes are also defined in our DataInputToolkit, so will use those instead of redefining them.


On 2018-05-21, 21:38, "jmc-dev on behalf of Erik Gahlin" <jmc-dev-bounces at on behalf of erik.gahlin at> wrote:

    Looks good.
    135: int index = lastChunkOffset + INTEGER_SIZE;
    Should not JFR_MAGIC_BYTES.length be used instead of INTEGER_SIZE.
    Also, there is Integer.BYTES and Short.Bytes that will give the number 
    of bytes for the types.
    263: long fullSize = DataInputToolkit.readLong(chunkHeader, HEADER_SIZE 
    - LONG_SIZE);
    I would define the position of chunk size relative to the start and what 
    comes after the magic.
    Also, JDK 8 and JDK 9 have different header sizes, so it's a bit unclear 
    what is meant with HEADER_SIZE [1]
    DataInputToolkit.readLong(chunkHeader, CHUNK_SIZE_POSITION);
    CHUNK_SIZE_POSITION could be used instead of INTEGER_SIZE above as well.
    No need to create new webrev.
    > Please review the fix for:
    > JBS:
    > Web rev:
    > Kind regards,
    > Marcus

More information about the jmc-dev mailing list