mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8253081: G1 fails on stale objects in archived module graph in Open Archive regions
Change the handling of Open Archive areas, instead of assuming that everything in there is live always, a root containing references to all live root objects is provided. Adapt G1 to handle Open Archive regions as any other old region apart from never compacting or evacuating them. Co-authored-by: Ioi Lam <iklam@openjdk.org> Reviewed-by: kbarrett, sjohanss, redestad
This commit is contained in:
parent
c08921487b
commit
d30956055b
32 changed files with 584 additions and 230 deletions
|
@ -59,6 +59,7 @@ public:
|
|||
}
|
||||
|
||||
void restore(ClassLoaderData* loader_data, bool do_entries, bool do_oops);
|
||||
void clear_archived_oops();
|
||||
};
|
||||
|
||||
static ArchivedClassLoaderData _archived_boot_loader_data;
|
||||
|
@ -123,6 +124,15 @@ void ArchivedClassLoaderData::restore(ClassLoaderData* loader_data, bool do_entr
|
|||
}
|
||||
}
|
||||
|
||||
void ArchivedClassLoaderData::clear_archived_oops() {
|
||||
assert(UseSharedSpaces, "must be");
|
||||
if (_modules != NULL) {
|
||||
for (int i = 0; i < _modules->length(); i++) {
|
||||
_modules->at(i)->clear_archived_oops();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------
|
||||
|
||||
static ClassLoaderData* null_class_loader_data() {
|
||||
|
@ -183,6 +193,13 @@ void ClassLoaderDataShared::serialize(SerializeClosure* f) {
|
|||
}
|
||||
}
|
||||
|
||||
void ClassLoaderDataShared::clear_archived_oops() {
|
||||
assert(UseSharedSpaces && !MetaspaceShared::use_full_module_graph(), "must be");
|
||||
_archived_boot_loader_data.clear_archived_oops();
|
||||
_archived_platform_loader_data.clear_archived_oops();
|
||||
_archived_system_loader_data.clear_archived_oops();
|
||||
}
|
||||
|
||||
oop ClassLoaderDataShared::restore_archived_oops_for_null_class_loader_data() {
|
||||
assert(UseSharedSpaces && MetaspaceShared::use_full_module_graph(), "must be");
|
||||
_archived_boot_loader_data.restore(null_class_loader_data(), false, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue