grafana / jfr-parser

Java Flight Recorder parser library written in Go.
Apache License 2.0
43 stars 16 forks source link

Use int64 as TypeID and use -1 as uninitialised value #41

Closed sivachandran closed 2 months ago

sivachandran commented 2 months ago

JFR can have events with type 0. So the uninitialised value of TypeID can't be 0. To hold -1 TypeID 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 int here. They are assigned with -1 when the type metadata is not specified in the chunk here.

korniltsev commented 2 months ago

Thanks. I will take a look some time later .