99 // CMS support.
100 static void remember_new_clds(bool remember) { _saved_head = (remember ? _head : NULL); }
101 static GrowableArray<ClassLoaderData*>* new_clds();
102
103 static void set_should_purge(bool b) { _should_purge = b; }
104 static void purge_if_needed() {
105 // Only purge the CLDG for CMS if concurrent sweep is complete.
106 if (_should_purge) {
107 purge();
108 // reset for next time.
109 set_should_purge(false);
110 }
111 }
112
113 static bool has_metaspace_oom() { return _metaspace_oom; }
114 static void set_metaspace_oom(bool value) { _metaspace_oom = value; }
115
116 static void dump_on(outputStream * const out) PRODUCT_RETURN;
117 static void dump() { dump_on(tty); }
118 static void verify();
119
120 static bool unload_list_contains(const void* x);
121 #ifndef PRODUCT
122 static bool contains_loader_data(ClassLoaderData* loader_data);
123 #endif
124
125 #if INCLUDE_TRACE
126 private:
127 static Ticks _class_unload_time;
128 static void class_unload_event(Klass* const k);
129 #endif
130 };
131
132 // ClassLoaderData class
133
134 class ClassLoaderData : public CHeapObj<mtClass> {
135 friend class VMStructs;
136 private:
137 class Dependencies VALUE_OBJ_CLASS_SPEC {
138 objArrayOop _list_head;
|
99 // CMS support.
100 static void remember_new_clds(bool remember) { _saved_head = (remember ? _head : NULL); }
101 static GrowableArray<ClassLoaderData*>* new_clds();
102
103 static void set_should_purge(bool b) { _should_purge = b; }
104 static void purge_if_needed() {
105 // Only purge the CLDG for CMS if concurrent sweep is complete.
106 if (_should_purge) {
107 purge();
108 // reset for next time.
109 set_should_purge(false);
110 }
111 }
112
113 static bool has_metaspace_oom() { return _metaspace_oom; }
114 static void set_metaspace_oom(bool value) { _metaspace_oom = value; }
115
116 static void dump_on(outputStream * const out) PRODUCT_RETURN;
117 static void dump() { dump_on(tty); }
118 static void verify();
119 static void log_creation(Handle loader, ClassLoaderData* cld, TRAPS);
120
121 static bool unload_list_contains(const void* x);
122 #ifndef PRODUCT
123 static bool contains_loader_data(ClassLoaderData* loader_data);
124 #endif
125
126 #if INCLUDE_TRACE
127 private:
128 static Ticks _class_unload_time;
129 static void class_unload_event(Klass* const k);
130 #endif
131 };
132
133 // ClassLoaderData class
134
135 class ClassLoaderData : public CHeapObj<mtClass> {
136 friend class VMStructs;
137 private:
138 class Dependencies VALUE_OBJ_CLASS_SPEC {
139 objArrayOop _list_head;
|