src/hotspot/share/classfile/classLoaderDataGraph.hpp
changeset 54961 30c8a21ce002
parent 54807 33fe50b6d707
child 55268 c5fe45d1281d
child 58678 9cf78a70fa4f
--- a/src/hotspot/share/classfile/classLoaderDataGraph.hpp	Tue May 21 15:51:35 2019 +0200
+++ b/src/hotspot/share/classfile/classLoaderDataGraph.hpp	Tue May 21 09:53:16 2019 -0400
@@ -119,16 +119,14 @@
   static GrowableArray<ClassLoaderData*>* new_clds();
 
   static void set_should_purge(bool b) { _should_purge = b; }
-  static void purge_if_needed() {
-    // Only purge the CLDG for CMS if concurrent sweep is complete.
-    if (_should_purge) {
-      purge();
-      // reset for next time.
-      set_should_purge(false);
-    }
+  static bool should_purge_and_reset() {
+    bool res = _should_purge;
+    // reset for next time.
+    set_should_purge(false);
+    return res;
   }
 
-  static int resize_if_needed();
+  static int resize_dictionaries();
 
   static bool has_metaspace_oom()           { return _metaspace_oom; }
   static void set_metaspace_oom(bool value) { _metaspace_oom = value; }