mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8072061: Automatically determine optimal sizes for the CDS regions
See new C++ class MetaspaceClosure. Reviewed-by: coleenp, jiangli, mseledtsov
This commit is contained in:
parent
4b983a51fd
commit
f7f193ae71
82 changed files with 2010 additions and 1622 deletions
|
@ -43,6 +43,8 @@ typedef Array<u1> AnnotationArray;
|
|||
// a type_annotation instance.
|
||||
|
||||
class Annotations: public MetaspaceObj {
|
||||
// If you add a new field that points to any metaspace object, you
|
||||
// must add this field to Annotations::metaspace_pointers_do().
|
||||
|
||||
// Annotations for this class, or null if none.
|
||||
AnnotationArray* _class_annotations;
|
||||
|
@ -63,6 +65,10 @@ class Annotations: public MetaspaceObj {
|
|||
|
||||
// Sizing (in words)
|
||||
static int size() { return sizeof(Annotations) / wordSize; }
|
||||
|
||||
// Annotations should be stored in the read-only region of CDS archive.
|
||||
static bool is_read_only_by_default() { return true; }
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
void collect_statistics(KlassSizeStats *sz) const;
|
||||
#endif
|
||||
|
@ -87,6 +93,9 @@ class Annotations: public MetaspaceObj {
|
|||
static typeArrayOop make_java_array(AnnotationArray* annotations, TRAPS);
|
||||
|
||||
bool is_klass() const { return false; }
|
||||
void metaspace_pointers_do(MetaspaceClosure* it);
|
||||
MetaspaceObj::Type type() const { return AnnotationsType; }
|
||||
|
||||
private:
|
||||
static julong count_bytes(Array<AnnotationArray*>* p);
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue