mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
Merge
This commit is contained in:
commit
a5b650be48
32 changed files with 2369 additions and 1229 deletions
|
@ -130,15 +130,13 @@ void DictionaryEntry::add_protection_domain(Dictionary* dict, oop protection_dom
|
|||
}
|
||||
|
||||
|
||||
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 @@ bool Dictionary::do_unloading() {
|
|||
// 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 @@ bool Dictionary::do_unloading() {
|
|||
p = probe->next_addr();
|
||||
}
|
||||
}
|
||||
return class_was_unloaded;
|
||||
}
|
||||
|
||||
void Dictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue