8225310: JFR crashed in JfrPeriodicEventSet::requestProtectionDomainCacheTableStatistics()

Added lock around table usage

Reviewed-by: coleenp, hseigel
This commit is contained in:
Gerard Ziemski 2019-06-18 12:39:29 -05:00
parent 28f3ab8596
commit 2cf9999ae2

@ -2861,14 +2861,17 @@ void SystemDictionary::dump(outputStream *st, bool verbose) {
}
TableStatistics SystemDictionary::placeholders_statistics() {
MutexLocker ml(SystemDictionary_lock);
return placeholders()->statistics_calculate();
}
TableStatistics SystemDictionary::loader_constraints_statistics() {
MutexLocker ml(SystemDictionary_lock);
return constraints()->statistics_calculate();
}
TableStatistics SystemDictionary::protection_domain_cache_statistics() {
MutexLocker ml(SystemDictionary_lock);
return pd_cache_table()->statistics_calculate();
}