mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8210155: Lock ClassLoaderDataGraph
In preparation for concurrent class unloading. Reviewed-by: hseigel, eosterlund
This commit is contained in:
parent
71479d029a
commit
eb9259138f
19 changed files with 199 additions and 82 deletions
|
@ -1919,6 +1919,7 @@ void SystemDictionary::well_known_klasses_do(MetaspaceClosure* it) {
|
|||
|
||||
void SystemDictionary::methods_do(void f(Method*)) {
|
||||
// Walk methods in loaded classes
|
||||
MutexLocker ml(ClassLoaderDataGraph_lock);
|
||||
ClassLoaderDataGraph::methods_do(f);
|
||||
// Walk method handle intrinsics
|
||||
invoke_method_table()->methods_do(f);
|
||||
|
@ -1936,6 +1937,7 @@ class RemoveClassesClosure : public CLDClosure {
|
|||
void SystemDictionary::remove_classes_in_error_state() {
|
||||
ClassLoaderData::the_null_class_loader_data()->dictionary()->remove_classes_in_error_state();
|
||||
RemoveClassesClosure rcc;
|
||||
MutexLocker ml(ClassLoaderDataGraph_lock);
|
||||
ClassLoaderDataGraph::cld_do(&rcc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue