changeset 51415:0aa5378d4f09

8209541: Fix merge problem in SymbolTable::do_check_concurrent_work Summary: remerged with previous change to do_unloading. Reviewed-by: hseigel
author coleenp
date Wed, 15 Aug 2018 16:01:48 -0400
parents b05b839160a3
children 8c2faee50bc4
files src/hotspot/share/classfile/classLoaderData.cpp src/hotspot/share/classfile/systemDictionary.cpp
diffstat 2 files changed, 12 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/classLoaderData.cpp	Wed Aug 15 15:50:23 2018 -0400
+++ b/src/hotspot/share/classfile/classLoaderData.cpp	Wed Aug 15 16:01:48 2018 -0400
@@ -1418,28 +1418,6 @@
   }
 
   if (seen_dead_loader) {
-    data = _head;
-    while (data != NULL) {
-      // Remove entries in the dictionary of live class loader that have
-      // initiated loading classes in a dead class loader.
-      if (data->dictionary() != NULL) {
-        data->dictionary()->do_unloading();
-      }
-      // Walk a ModuleEntry's reads, and a PackageEntry's exports
-      // lists to determine if there are modules on those lists that are now
-      // dead and should be removed.  A module's life cycle is equivalent
-      // to its defining class loader's life cycle.  Since a module is
-      // considered dead if its class loader is dead, these walks must
-      // occur after each class loader's aliveness is determined.
-      if (data->packages() != NULL) {
-        data->packages()->purge_all_package_exports();
-      }
-      if (data->modules_defined()) {
-        data->modules()->purge_all_module_reads();
-      }
-      data = data->next();
-    }
-    SymbolTable::do_check_concurrent_work();
     JFR_ONLY(post_class_unload_events();)
   }
 
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Wed Aug 15 15:50:23 2018 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Wed Aug 15 16:01:48 2018 -0400
@@ -1858,10 +1858,19 @@
     }
   }
 
+  // TODO: just return if !unloading_occurred.
   if (unloading_occurred) {
-    GCTraceTime(Debug, gc, phases) t("Dictionary", gc_timer);
-    constraints()->purge_loader_constraints();
-    resolution_errors()->purge_resolution_errors();
+    {
+      GCTraceTime(Debug, gc, phases) t("SymbolTable", gc_timer);
+      // Check if there's work to do in the SymbolTable
+      SymbolTable::do_check_concurrent_work();
+    }
+
+    {
+      GCTraceTime(Debug, gc, phases) t("Dictionary", gc_timer);
+      constraints()->purge_loader_constraints();
+      resolution_errors()->purge_resolution_errors();
+    }
   }
 
   {