Skip to content

[GR-67262] Fix JFR GC events. #11570

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

roberttoyonaga
Copy link
Collaborator

@roberttoyonaga roberttoyonaga commented Jul 4, 2025

We are currently writing JFR jdk.GarbageCollection events incorrectly. The event format has an "event thread" data field, but we are not writing it. This causes the subsequent fields to have incorrect placement and be written wrong as well.

Before the fix: notice many fields are blank or zero
image
After the fix:
image

I've added a test to catch such issues in the future.

This bug affects the GraalVM for JDK 25 release branch (https://github.com/oracle/graal/tree/release/graal-vm/25.0) as well and should be backported to it.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 4, 2025
checkstyle

fix small bug
@roberttoyonaga roberttoyonaga marked this pull request as ready for review July 4, 2025 21:16
@roberttoyonaga roberttoyonaga force-pushed the fix-jfr-gc-event branch 3 times, most recently from e579446 to 448c06b Compare July 7, 2025 14:56
@christianhaeubl christianhaeubl changed the title Fix JFR GC events [GR-67262] Fix JFR GC events. Jul 8, 2025
@christianhaeubl
Copy link
Member

Thanks, will be integrated in the next few days.

@@ -0,0 +1,69 @@
/*
* Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2022, Red Hat Inc. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change the copyright years of this file to 2025 if this is fine with you.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please! I forgot to update that. Thanks

@graalvmbot graalvmbot merged commit 448c06b into oracle:master Jul 8, 2025
24 of 25 checks passed
@roberttoyonaga
Copy link
Collaborator Author

@christianhaeubl should I now open a backport PR to the GraalVM for JDK25 release branch?

@christianhaeubl
Copy link
Member

Not necessary, I already did that (but may take a few days until it gets merged and therefore mirrored to GitHub).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
native-image native-image-jfr OCA Verified All contributors have signed the Oracle Contributor Agreement. redhat-interest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants