1.1 --- a/src/share/vm/classfile/dictionary.cpp Tue Jul 01 09:03:55 2014 +0200 1.2 +++ b/src/share/vm/classfile/dictionary.cpp Mon Jul 07 10:12:40 2014 +0200 1.3 @@ -199,6 +199,26 @@ 1.4 return class_was_unloaded; 1.5 } 1.6 1.7 +void Dictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) { 1.8 + // Skip the strong roots probe marking if the closures are the same. 1.9 + if (strong == weak) { 1.10 + oops_do(strong); 1.11 + return; 1.12 + } 1.13 + 1.14 + for (int index = 0; index < table_size(); index++) { 1.15 + for (DictionaryEntry *probe = bucket(index); 1.16 + probe != NULL; 1.17 + probe = probe->next()) { 1.18 + Klass* e = probe->klass(); 1.19 + ClassLoaderData* loader_data = probe->loader_data(); 1.20 + if (is_strongly_reachable(loader_data, e)) { 1.21 + probe->set_strongly_reachable(); 1.22 + } 1.23 + } 1.24 + } 1.25 + _pd_cache_table->roots_oops_do(strong, weak); 1.26 +} 1.27 1.28 void Dictionary::always_strong_oops_do(OopClosure* blk) { 1.29 // Follow all system classes and temporary placeholders in dictionary; only 1.30 @@ -490,6 +510,23 @@ 1.31 } 1.32 } 1.33 1.34 +void ProtectionDomainCacheTable::roots_oops_do(OopClosure* strong, OopClosure* weak) { 1.35 + for (int index = 0; index < table_size(); index++) { 1.36 + for (ProtectionDomainCacheEntry* probe = bucket(index); 1.37 + probe != NULL; 1.38 + probe = probe->next()) { 1.39 + if (probe->is_strongly_reachable()) { 1.40 + probe->reset_strongly_reachable(); 1.41 + probe->oops_do(strong); 1.42 + } else { 1.43 + if (weak != NULL) { 1.44 + probe->oops_do(weak); 1.45 + } 1.46 + } 1.47 + } 1.48 + } 1.49 +} 1.50 + 1.51 uint ProtectionDomainCacheTable::bucket_size() { 1.52 return sizeof(ProtectionDomainCacheEntry); 1.53 }