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

Move JFR loadedClassCount to J9JavaVM #20987

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

thallium
Copy link
Contributor

JFR loadedClassCount was originally kept tracked in classloader. When the classloader gets unloaded, we will lose the count.

Related: #20679

JFR loadedClassCount was originally kept tracked in classloader. When
the classloader gets unloaded, we will lose the count.

Related: eclipse-openj9#20679

Signed-off-by: Gengchen Tuo <[email protected]>
@thallium
Copy link
Contributor Author

@tajila can you please review?

@tajila
Copy link
Contributor

tajila commented Jan 21, 2025

jenkins test sanity.functional alinux64 jdk17

@tajila tajila merged commit 9f2e523 into eclipse-openj9:master Jan 22, 2025
5 checks passed
@@ -2169,7 +2169,7 @@ internalCreateRAMClassDone(J9VMThread *vmThread, J9ClassLoader *classLoader, J9C
}

#if defined(J9VM_OPT_JFR)
hostClassLoader->loadedClassCount += 1;
javaVM->loadedClassCount += 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be done atomically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The calling thread should be holding the classtable mutex so we don't need atomic?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems you're right, however, it would help if this function called out that expectation (like line 759 does for computeVTable().

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.

3 participants