8072061: Automatically determine optimal sizes for the CDS regions

See new C++ class MetaspaceClosure.

Reviewed-by: coleenp, jiangli, mseledtsov
This commit is contained in:
Ioi Lam 2017-08-02 18:06:38 -07:00
parent 4b983a51fd
commit f7f193ae71
82 changed files with 2010 additions and 1622 deletions

View file

@ -35,6 +35,8 @@ class ObjArrayKlass : public ArrayKlass {
friend class VMStructs;
friend class JVMCIVMStructs;
private:
// If you add a new field that points to any metaspace object, you
// must add this field to ObjArrayKlass::metaspace_pointers_do().
Klass* _element_klass; // The klass of the elements of this array type
Klass* _bottom_klass; // The one-dimensional type (InstanceKlass or TypeArrayKlass)
@ -80,6 +82,8 @@ class ObjArrayKlass : public ArrayKlass {
// Compute protection domain
oop protection_domain() const { return bottom_klass()->protection_domain(); }
virtual void metaspace_pointers_do(MetaspaceClosure* iter);
private:
// Either oop or narrowOop depending on UseCompressedOops.
// must be called from within ObjArrayKlass.cpp