src/hotspot/share/memory/heapShared.cpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54927 1512d88b24c6
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
    77   {"jdk/internal/module/ArchivedModuleGraph",  "archivedModuleGraph"},
    77   {"jdk/internal/module/ArchivedModuleGraph",  "archivedModuleGraph"},
    78   {"java/util/ImmutableCollections$ListN",     "EMPTY_LIST"},
    78   {"java/util/ImmutableCollections$ListN",     "EMPTY_LIST"},
    79   {"java/util/ImmutableCollections$MapN",      "EMPTY_MAP"},
    79   {"java/util/ImmutableCollections$MapN",      "EMPTY_MAP"},
    80   {"java/util/ImmutableCollections$SetN",      "EMPTY_SET"},
    80   {"java/util/ImmutableCollections$SetN",      "EMPTY_SET"},
    81   {"java/lang/module/Configuration",           "EMPTY_CONFIGURATION"},
    81   {"java/lang/module/Configuration",           "EMPTY_CONFIGURATION"},
       
    82   {"jdk/internal/math/FDBigInteger",           "archivedCaches"},
    82 };
    83 };
    83 
    84 
    84 const static int num_closed_archive_subgraph_entry_fields =
    85 const static int num_closed_archive_subgraph_entry_fields =
    85   sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
    86   sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
    86 const static int num_open_archive_subgraph_entry_fields =
    87 const static int num_open_archive_subgraph_entry_fields =
    96   mapinfo->fixup_mapped_heap_regions();
    97   mapinfo->fixup_mapped_heap_regions();
    97   set_archive_heap_region_fixed();
    98   set_archive_heap_region_fixed();
    98 }
    99 }
    99 
   100 
   100 unsigned HeapShared::oop_hash(oop const& p) {
   101 unsigned HeapShared::oop_hash(oop const& p) {
   101   assert(!p->mark()->has_bias_pattern(),
   102   assert(!p->mark().has_bias_pattern(),
   102          "this object should never have been locked");  // so identity_hash won't safepoin
   103          "this object should never have been locked");  // so identity_hash won't safepoin
   103   unsigned hash = (unsigned)p->identity_hash();
   104   unsigned hash = (unsigned)p->identity_hash();
   104   return hash;
   105   return hash;
   105 }
   106 }
   106 
   107 
   580                                                          Thread* THREAD) {
   581                                                          Thread* THREAD) {
   581   // Check fields in the object
   582   // Check fields in the object
   582   for (JavaFieldStream fs(k); !fs.done(); fs.next()) {
   583   for (JavaFieldStream fs(k); !fs.done(); fs.next()) {
   583     if (!fs.access_flags().is_static()) {
   584     if (!fs.access_flags().is_static()) {
   584       BasicType ft = fs.field_descriptor().field_type();
   585       BasicType ft = fs.field_descriptor().field_type();
   585       if (!fs.access_flags().is_final() && (ft == T_ARRAY || ft == T_OBJECT)) {
   586       if (!fs.access_flags().is_final() && is_reference_type(ft)) {
   586         ResourceMark rm(THREAD);
   587         ResourceMark rm(THREAD);
   587         log_warning(cds, heap)(
   588         log_warning(cds, heap)(
   588           "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",
   589           k->external_name(), (fs.name())->as_C_string(),
   590           k->external_name(), (fs.name())->as_C_string(),
   590           (fs.signature())->as_C_string());
   591           (fs.signature())->as_C_string());
   868     _ik(ik), _field_name(field_name), _found(false), _offset(-1) {}
   869     _ik(ik), _field_name(field_name), _found(false), _offset(-1) {}
   869 
   870 
   870   virtual void do_field(fieldDescriptor* fd) {
   871   virtual void do_field(fieldDescriptor* fd) {
   871     if (fd->name() == _field_name) {
   872     if (fd->name() == _field_name) {
   872       assert(!_found, "fields cannot be overloaded");
   873       assert(!_found, "fields cannot be overloaded");
   873       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");
   874       _found = true;
   875       _found = true;
   875       _offset = fd->offset();
   876       _offset = fd->offset();
   876     }
   877     }
   877   }
   878   }
   878   bool found()     { return _found;  }
   879   bool found()     { return _found;  }