Review Request: JMC-5922: Adding support for JDK9 and later for the chunk splitter.
marcus.hirt at oracle.com
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 openjdk.java.net on behalf of erik.gahlin at oracle.com> wrote:
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 
int CHUNK_SIZE_POSITION = JFR_MAGIC_BYTES.length;
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: https://bugs.openjdk.java.net/browse/JMC-5922
> Web rev: http://cr.openjdk.java.net/~hirt/JMC-5922/webrev.1/
> Kind regards,
More information about the jmc-dev