Skip to content

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.

5 participants