< prev index next >

src/hotspot/share/memory/heapShared.cpp

Print this page


  80   {"jdk/internal/module/ArchivedModuleGraph",  "archivedModuleGraph"},
  81   {"java/util/ImmutableCollections",           "archivedObjects"},
  82   {"java/lang/module/Configuration",           "EMPTY_CONFIGURATION"},
  83   {"jdk/internal/math/FDBigInteger",           "archivedCaches"},
  84 };
  85 
  86 const static int num_closed_archive_subgraph_entry_fields =
  87   sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  88 const static int num_open_archive_subgraph_entry_fields =
  89   sizeof(open_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  90 
  91 ////////////////////////////////////////////////////////////////
  92 //
  93 // Java heap object archiving support
  94 //
  95 ////////////////////////////////////////////////////////////////
  96 void HeapShared::fixup_mapped_heap_regions() {
  97   FileMapInfo *mapinfo = FileMapInfo::current_info();
  98   mapinfo->fixup_mapped_heap_regions();
  99   set_archive_heap_region_fixed();

 100 }
 101 
 102 unsigned HeapShared::oop_hash(oop const& p) {
 103   assert(!p->mark().has_bias_pattern(),
 104          "this object should never have been locked");  // so identity_hash won't safepoin
 105   unsigned hash = (unsigned)p->identity_hash();
 106   return hash;
 107 }
 108 
 109 HeapShared::ArchivedObjectCache* HeapShared::_archived_object_cache = NULL;
 110 oop HeapShared::find_archived_heap_object(oop obj) {
 111   assert(DumpSharedSpaces, "dump-time only");
 112   ArchivedObjectCache* cache = archived_object_cache();
 113   oop* p = cache->get(obj);
 114   if (p != NULL) {
 115     return *p;
 116   } else {
 117     return NULL;
 118   }
 119 }




  80   {"jdk/internal/module/ArchivedModuleGraph",  "archivedModuleGraph"},
  81   {"java/util/ImmutableCollections",           "archivedObjects"},
  82   {"java/lang/module/Configuration",           "EMPTY_CONFIGURATION"},
  83   {"jdk/internal/math/FDBigInteger",           "archivedCaches"},
  84 };
  85 
  86 const static int num_closed_archive_subgraph_entry_fields =
  87   sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  88 const static int num_open_archive_subgraph_entry_fields =
  89   sizeof(open_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  90 
  91 ////////////////////////////////////////////////////////////////
  92 //
  93 // Java heap object archiving support
  94 //
  95 ////////////////////////////////////////////////////////////////
  96 void HeapShared::fixup_mapped_heap_regions() {
  97   FileMapInfo *mapinfo = FileMapInfo::current_info();
  98   mapinfo->fixup_mapped_heap_regions();
  99   set_archive_heap_region_fixed();
 100   SystemDictionaryShared::update_archived_mirror_native_pointers();
 101 }
 102 
 103 unsigned HeapShared::oop_hash(oop const& p) {
 104   assert(!p->mark().has_bias_pattern(),
 105          "this object should never have been locked");  // so identity_hash won't safepoin
 106   unsigned hash = (unsigned)p->identity_hash();
 107   return hash;
 108 }
 109 
 110 HeapShared::ArchivedObjectCache* HeapShared::_archived_object_cache = NULL;
 111 oop HeapShared::find_archived_heap_object(oop obj) {
 112   assert(DumpSharedSpaces, "dump-time only");
 113   ArchivedObjectCache* cache = archived_object_cache();
 114   oop* p = cache->get(obj);
 115   if (p != NULL) {
 116     return *p;
 117   } else {
 118     return NULL;
 119   }
 120 }


< prev index next >