8225310: JFR crashed in JfrPeriodicEventSet::requestProtectionDomainCacheTableStatistics()
authorgziemski
Tue, 18 Jun 2019 12:39:29 -0500
changeset 55419 3e08fa647eea
parent 55418 922a4a554807
child 55420 bc5a0508253c
8225310: JFR crashed in JfrPeriodicEventSet::requestProtectionDomainCacheTableStatistics() Summary: Added lock around table usage Reviewed-by: coleenp, hseigel
src/hotspot/share/classfile/systemDictionary.cpp
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Tue Jun 18 10:00:35 2019 +0530
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue Jun 18 12:39:29 2019 -0500
@@ -2861,14 +2861,17 @@
 }
 
 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();
 }