JFR can have events with type 0. So the uninitialised value of TypeID can't be 0. To hold -1TypeID type is changed as int64.
Also, the global type like T_EXECUTION_SAMPLE and its bind variable needs to be uninitialised when the type metadata is not specified in the current chunk.
I believe jfr-parse implementation is heavily inspired by https://github.com/async-profiler/. In async-profiler the global types are defined as inthere. They are assigned with -1 when the type metadata is not specified in the chunk here.
JFR can have events with type
0
. So the uninitialised value ofTypeID
can't be0
. To hold-1
TypeID
type is changed asint64
.Also, the global type like
T_EXECUTION_SAMPLE
and its bind variable needs to be uninitialised when the type metadata is not specified in the current chunk.I believe jfr-parse implementation is heavily inspired by https://github.com/async-profiler/. In async-profiler the global types are defined as
int
here. They are assigned with-1
when the type metadata is not specified in the chunk here.