From 0c7bc97af3b8843c1ffddc941aaf9e26d634ad79 Mon Sep 17 00:00:00 2001 From: Gengchen Tuo Date: Fri, 3 Jan 2025 14:57:03 -0500 Subject: [PATCH] Add unloaded anonClass count to JFR ClassLoadingStatistics Related: https://github.com/eclipse-openj9/openj9/pull/20679 Signed-off-by: Gengchen Tuo --- runtime/vm/jfr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/vm/jfr.cpp b/runtime/vm/jfr.cpp index c52e650978a..6fdd0b5a68b 100644 --- a/runtime/vm/jfr.cpp +++ b/runtime/vm/jfr.cpp @@ -980,8 +980,9 @@ jfrClassLoadingStatistics(J9VMThread *currentThread) initializeEventFields(currentThread, (J9JFREvent *)jfrEvent, J9JFR_EVENT_TYPE_CLASS_LOADING_STATISTICS); UDATA unloadedClassCount = 0; - vm->memoryManagerFunctions->j9gc_get_cumulative_class_unloading_stats(currentThread, NULL, &unloadedClassCount, NULL); - jfrEvent->unloadedClassCount = (I_64)unloadedClassCount; + UDATA unloadedAnonClassCount = 0; + vm->memoryManagerFunctions->j9gc_get_cumulative_class_unloading_stats(currentThread, &unloadedAnonClassCount, &unloadedClassCount, NULL); + jfrEvent->unloadedClassCount = (I_64)(unloadedClassCount + unloadedAnonClassCount); internalReleaseVMAccess(currentThread);