8210155: Lock ClassLoaderDataGraph

In preparation for concurrent class unloading.

Reviewed-by: hseigel, eosterlund
This commit is contained in:
Coleen Phillimore 2018-08-31 07:03:46 -04:00
parent 71479d029a
commit eb9259138f
19 changed files with 199 additions and 82 deletions

View file

@ -346,6 +346,7 @@ void print_statistics() {
if (PrintSystemDictionaryAtExit) {
ResourceMark rm;
MutexLocker mcld(ClassLoaderDataGraph_lock);
SystemDictionary::print();
ClassLoaderDataGraph::print();
}
@ -494,6 +495,7 @@ void before_exit(JavaThread* thread) {
Universe::print_on(&ls_info);
if (log.is_trace()) {
LogStream ls_trace(log.trace());
MutexLocker mcld(ClassLoaderDataGraph_lock);
ClassLoaderDataGraph::print_on(&ls_trace);
}
}