Skip to content

Commit

Permalink
Merge pull request #20882 from thallium/jfr-class-loading-stats
Browse files Browse the repository at this point in the history
Add unloaded anonClass count to JFR ClassLoadingStatistics
  • Loading branch information
tajila authored Jan 5, 2025
2 parents 8b21775 + 0c7bc97 commit a32dd87
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 a32dd87

Please sign in to comment.