@@ -188,17 +188,24 @@ bool DictionaryEntry::contains_protection_domain(oop protection_domain) const {
188
188
return false ;
189
189
}
190
190
191
- void DictionaryEntry::add_protection_domain (Dictionary* dict , Handle protection_domain) {
192
- assert_locked_or_safepoint (SystemDictionary_lock);
191
+ void DictionaryEntry::add_protection_domain (ClassLoaderData* loader_data , Handle protection_domain) {
192
+ assert_lock_strong (SystemDictionary_lock);
193
193
if (!contains_protection_domain (protection_domain ())) {
194
- ProtectionDomainCacheEntry* entry = SystemDictionary::cache_get (protection_domain);
194
+ ProtectionDomainCacheEntry* entry = SystemDictionary::pd_cache_table ()-> get (protection_domain);
195
195
// Additions and deletions hold the SystemDictionary_lock, readers are lock-free
196
196
ProtectionDomainEntry* new_head = new ProtectionDomainEntry (entry, _pd_set);
197
197
release_set_pd_set (new_head);
198
198
}
199
199
LogTarget (Trace, protectiondomain) lt;
200
200
if (lt.is_enabled ()) {
201
+ ResourceMark rm;
201
202
LogStream ls (lt);
203
+ ls.print (" adding protection domain for class %s" , instance_klass ()->name ()->as_C_string ());
204
+ ls.print (" class loader: " );
205
+ loader_data->class_loader ()->print_value_on (&ls);
206
+ ls.print (" protection domain: " );
207
+ protection_domain->print_value_on (&ls);
208
+ ls.print (" " );
202
209
print_count (&ls);
203
210
}
204
211
}
@@ -335,7 +342,7 @@ void Dictionary::add_protection_domain(int index, unsigned int hash,
335
342
assert (protection_domain () != NULL ,
336
343
" real protection domain should be present" );
337
344
338
- entry->add_protection_domain (this , protection_domain);
345
+ entry->add_protection_domain (loader_data () , protection_domain);
339
346
340
347
#ifdef ASSERT
341
348
assert (loader_data () != ClassLoaderData::the_null_class_loader_data (), " doesn't make sense" );
0 commit comments