src/hotspot/share/classfile/classLoaderData.cpp
changeset 50219 4ab066d71956
parent 50113 caf115bb98ad
child 50599 ecc2af326b5f
equal deleted inserted replaced
50218:0df902a00215 50219:4ab066d71956
   571 }
   571 }
   572 
   572 
   573 void ClassLoaderData::unload() {
   573 void ClassLoaderData::unload() {
   574   _unloading = true;
   574   _unloading = true;
   575 
   575 
   576   // Tell serviceability tools these classes are unloading
       
   577   classes_do(InstanceKlass::notify_unload_class);
       
   578 
       
   579   LogTarget(Debug, class, loader, data) lt;
   576   LogTarget(Debug, class, loader, data) lt;
   580   if (lt.is_enabled()) {
   577   if (lt.is_enabled()) {
   581     ResourceMark rm;
   578     ResourceMark rm;
   582     LogStream ls(lt);
   579     LogStream ls(lt);
   583     ls.print("unload");
   580     ls.print("unload");
   586   }
   583   }
   587 
   584 
   588   // Some items on the _deallocate_list need to free their C heap structures
   585   // Some items on the _deallocate_list need to free their C heap structures
   589   // if they are not already on the _klasses list.
   586   // if they are not already on the _klasses list.
   590   unload_deallocate_list();
   587   unload_deallocate_list();
       
   588 
       
   589   // Tell serviceability tools these classes are unloading
       
   590   // after erroneous classes are released.
       
   591   classes_do(InstanceKlass::notify_unload_class);
   591 
   592 
   592   // Clean up global class iterator for compiler
   593   // Clean up global class iterator for compiler
   593   static_klass_iterator.adjust_saved_class(this);
   594   static_klass_iterator.adjust_saved_class(this);
   594 }
   595 }
   595 
   596