equal
deleted
inserted
replaced
581 Thread* THREAD) { |
581 Thread* THREAD) { |
582 // Check fields in the object |
582 // Check fields in the object |
583 for (JavaFieldStream fs(k); !fs.done(); fs.next()) { |
583 for (JavaFieldStream fs(k); !fs.done(); fs.next()) { |
584 if (!fs.access_flags().is_static()) { |
584 if (!fs.access_flags().is_static()) { |
585 BasicType ft = fs.field_descriptor().field_type(); |
585 BasicType ft = fs.field_descriptor().field_type(); |
586 if (!fs.access_flags().is_final() && (ft == T_ARRAY || ft == T_OBJECT)) { |
586 if (!fs.access_flags().is_final() && is_reference_type(ft)) { |
587 ResourceMark rm(THREAD); |
587 ResourceMark rm(THREAD); |
588 log_warning(cds, heap)( |
588 log_warning(cds, heap)( |
589 "Please check reference field in %s instance in closed archive heap region: %s %s", |
589 "Please check reference field in %s instance in closed archive heap region: %s %s", |
590 k->external_name(), (fs.name())->as_C_string(), |
590 k->external_name(), (fs.name())->as_C_string(), |
591 (fs.signature())->as_C_string()); |
591 (fs.signature())->as_C_string()); |
869 _ik(ik), _field_name(field_name), _found(false), _offset(-1) {} |
869 _ik(ik), _field_name(field_name), _found(false), _offset(-1) {} |
870 |
870 |
871 virtual void do_field(fieldDescriptor* fd) { |
871 virtual void do_field(fieldDescriptor* fd) { |
872 if (fd->name() == _field_name) { |
872 if (fd->name() == _field_name) { |
873 assert(!_found, "fields cannot be overloaded"); |
873 assert(!_found, "fields cannot be overloaded"); |
874 assert(fd->field_type() == T_OBJECT || fd->field_type() == T_ARRAY, "can archive only obj or array fields"); |
874 assert(is_reference_type(fd->field_type()), "can archive only fields that are references"); |
875 _found = true; |
875 _found = true; |
876 _offset = fd->offset(); |
876 _offset = fd->offset(); |
877 } |
877 } |
878 } |
878 } |
879 bool found() { return _found; } |
879 bool found() { return _found; } |