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

Erik Gahlin erik.gahlin at
Mon May 21 19:38:06 UTC 2018

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 

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