changeset 56839:3e08fa647eea

8225310: JFR crashed in JfrPeriodicEventSet::requestProtectionDomainCacheTableStatistics() Summary: Added lock around table usage Reviewed-by: coleenp, hseigel
author gziemski
date Tue, 18 Jun 2019 12:39:29 -0500
parents 922a4a554807
children bc5a0508253c
files src/hotspot/share/classfile/systemDictionary.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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();
 }