--- a/hotspot/src/share/vm/classfile/dictionary.cpp Wed Aug 13 17:37:11 2014 -0700
+++ b/hotspot/src/share/vm/classfile/dictionary.cpp Thu Aug 14 09:15:39 2014 +0200
@@ -130,15 +130,13 @@
}
-bool Dictionary::do_unloading() {
+void Dictionary::do_unloading() {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
- bool class_was_unloaded = false;
- int index = 0; // Defined here for portability! Do not move
// Remove unloadable entries and classes from system dictionary
// The placeholder array has been handled in always_strong_oops_do.
DictionaryEntry* probe = NULL;
- for (index = 0; index < table_size(); index++) {
+ for (int index = 0; index < table_size(); index++) {
for (DictionaryEntry** p = bucket_addr(index); *p != NULL; ) {
probe = *p;
Klass* e = probe->klass();
@@ -158,16 +156,8 @@
// Do we need to delete this system dictionary entry?
if (loader_data->is_unloading()) {
// If the loader is not live this entry should always be
- // removed (will never be looked up again). Note that this is
- // not the same as unloading the referred class.
- if (k_def_class_loader_data == loader_data) {
- // This is the defining entry, so the referred class is about
- // to be unloaded.
- class_was_unloaded = true;
- }
- // Also remove this system dictionary entry.
+ // removed (will never be looked up again).
purge_entry = true;
-
} else {
// The loader in this entry is alive. If the klass is dead,
// (determined by checking the defining class loader)
@@ -196,7 +186,6 @@
p = probe->next_addr();
}
}
- return class_was_unloaded;
}
void Dictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) {