mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8140802: Clean up and refactor of class loading code for CDS
Reviewed-by: jiangli, acorn, coleenp
This commit is contained in:
parent
0580d65a1c
commit
87b0df30ed
20 changed files with 426 additions and 74 deletions
|
@ -187,6 +187,9 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
// Support for walking class loader data objects
|
||||
ClassLoaderData* _next; /// Next loader_datas created
|
||||
|
||||
// CDS
|
||||
int _shared_class_loader_id;
|
||||
|
||||
// ReadOnly and ReadWrite metaspaces (static because only on the null
|
||||
// class loader for now).
|
||||
static Metaspace* _ro_metaspace;
|
||||
|
@ -308,6 +311,15 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
Metaspace* ro_metaspace();
|
||||
Metaspace* rw_metaspace();
|
||||
void initialize_shared_metaspaces();
|
||||
|
||||
int shared_class_loader_id() {
|
||||
return _shared_class_loader_id;
|
||||
}
|
||||
void set_shared_class_loader_id(int id) {
|
||||
assert(id >= 0, "sanity");
|
||||
assert(_shared_class_loader_id <0, "cannot be assigned more than once");
|
||||
_shared_class_loader_id = id;
|
||||
}
|
||||
};
|
||||
|
||||
// An iterator that distributes Klasses to parallel worker threads.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue