Skip to content

Commit

Permalink
Add unloaded anonClass count to JFR ClassLoadingStatistics
Browse files Browse the repository at this point in the history
Related: #20679
Signed-off-by: Gengchen Tuo <[email protected]>
  • Loading branch information
thallium committed Jan 3, 2025
1 parent 4c82e0a commit 0c7bc97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/vm/jfr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0c7bc97

Please sign in to comment.