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

@ -36,6 +36,8 @@ class klassVtable;
class ArrayKlass: public Klass {
friend class VMStructs;
private:
// If you add a new field that points to any metaspace object, you
// must add this field to ArrayKlass::metaspace_pointers_do().
int _dimension; // This is n'th-dimensional array.
Klass* volatile _higher_dimension; // Refers the (n+1)'th-dimensional array (if present).
Klass* volatile _lower_dimension; // Refers the (n-1)'th-dimensional array (if present).
@ -102,6 +104,8 @@ class ArrayKlass: public Klass {
// Sizing
static int static_size(int header_size);
virtual void metaspace_pointers_do(MetaspaceClosure* iter);
#if INCLUDE_SERVICES
virtual void collect_statistics(KlassSizeStats *sz) const {
Klass::collect_statistics(sz);