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

Add Java monitor inflation JFR event #5701

Merged
merged 5 commits into from Feb 14, 2023

Conversation

roberttoyonaga
Copy link
Collaborator

@roberttoyonaga roberttoyonaga commented Jan 4, 2023

This pull request adds the jdk.JavaMonitorInflate JFR event.

In Hotspot, object monitors can be inflated and deflated. Inflation is the slow path and it happens when there is contention for the monitor, among other reasons. Once there are no longer threads waiting for the monitor, the monitor is deflated and the fast path can be used again. In SVM, inflation essentially happens whenever a JavaMonitor is lazily created for an object. Deflation doesn't ever happen. So in SVM this event can only help describe how often JavaMonitors are being created and why (the "cause"), it doesn't provide insight into how often the slow path is taken (because it's always taken). In the future, if SVM monitors become more complex like in hotspot, then this event would become more useful.

When this is done, the JFR Support tracking Issue should be updated to reflect the changes.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 4, 2023
@oubidar-Abderrahim
Copy link
Member

Thank you for contributing to GraalVM.
@fniephaus @christianhaeubl could you please review this PR? or assign someone better suited to do so? Thank you

Copy link
Member

@christianhaeubl christianhaeubl left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this event. The changes look good, I will do a few cleanups and merge your PR into master.

@graalvmbot graalvmbot merged commit c7cffab into oracle:master Feb 14, 2023
@fniephaus fniephaus added this to the 23.0.0 Release milestone Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants