Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

sivachandran
Copy link
Contributor

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.

@sivachandran sivachandran changed the title Use -1 as uninitialised type id value Use int64 as TypeID and use -1 as uninitialised value Sep 5, 2024
@korniltsev
Copy link
Collaborator

Thanks. I will take a look some time later .

@korniltsev korniltsev merged commit c7aebd8 into grafana:main Sep 6, 2024
2 checks passed
@sivachandran sivachandran deleted the use-int64-for-typeid branch September 9, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants