src/hotspot/share/runtime/safepoint.cpp
changeset 47774 69c081ca110a
parent 47637 87141990dde5
child 47881 0ce0ac68ace7
--- a/src/hotspot/share/runtime/safepoint.cpp	Thu Nov 02 18:44:44 2017 +0300
+++ b/src/hotspot/share/runtime/safepoint.cpp	Thu Nov 02 11:00:34 2017 -0500
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "classfile/classLoaderData.hpp"
 #include "classfile/stringTable.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -618,6 +619,14 @@
       ClassLoaderDataGraph::purge_if_needed();
       event_safepoint_cleanup_task_commit(event, name);
     }
+
+    if (!_subtasks.is_task_claimed(SafepointSynchronize::SAFEPOINT_CLEANUP_SYSTEM_DICTIONARY_RESIZE)) {
+      const char* name = "resizing system dictionaries";
+      EventSafepointCleanupTask event;
+      TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
+      ClassLoaderDataGraph::resize_if_needed();
+      event_safepoint_cleanup_task_commit(event, name);
+    }
     _subtasks.all_tasks_completed(_num_workers);
   }
 };