< prev index next >

src/hotspot/share/memory/heapShared.cpp

Print this page
rev 52800 : 8214858: Improve module graph archiving
Reviewed-by: alanb


  54 
  55 address   HeapShared::_narrow_oop_base;
  56 int       HeapShared::_narrow_oop_shift;
  57 
  58 //
  59 // If you add new entries to the following tables, you should know what you're doing!
  60 //
  61 
  62 // Entry fields for shareable subgraphs archived in the closed archive heap
  63 // region. Warning: Objects in the subgraphs should not have reference fields
  64 // assigned at runtime.
  65 static ArchivableStaticFieldInfo closed_archive_subgraph_entry_fields[] = {
  66   {"java/lang/Integer$IntegerCache",           "archivedCache"},
  67   {"java/lang/Long$LongCache",                 "archivedCache"},
  68   {"java/lang/Byte$ByteCache",                 "archivedCache"},
  69   {"java/lang/Short$ShortCache",               "archivedCache"},
  70   {"java/lang/Character$CharacterCache",       "archivedCache"},
  71 };
  72 // Entry fields for subgraphs archived in the open archive heap region.
  73 static ArchivableStaticFieldInfo open_archive_subgraph_entry_fields[] = {
  74   {"jdk/internal/module/ArchivedModuleGraph",  "archivedSystemModules"},
  75   {"jdk/internal/module/ArchivedModuleGraph",  "archivedModuleFinder"},
  76   {"jdk/internal/module/ArchivedModuleGraph",  "archivedMainModule"},
  77   {"jdk/internal/module/ArchivedModuleGraph",  "archivedConfiguration"},
  78   {"java/util/ImmutableCollections$ListN",     "EMPTY_LIST"},
  79   {"java/util/ImmutableCollections$MapN",      "EMPTY_MAP"},
  80   {"java/util/ImmutableCollections$SetN",      "EMPTY_SET"},
  81   {"java/lang/module/Configuration",           "EMPTY_CONFIGURATION"},
  82 };
  83 
  84 const static int num_closed_archive_subgraph_entry_fields =
  85   sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  86 const static int num_open_archive_subgraph_entry_fields =
  87   sizeof(open_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  88 
  89 ////////////////////////////////////////////////////////////////
  90 //
  91 // Java heap object archiving support
  92 //
  93 ////////////////////////////////////////////////////////////////
  94 void HeapShared::fixup_mapped_heap_regions() {
  95   FileMapInfo *mapinfo = FileMapInfo::current_info();
  96   mapinfo->fixup_mapped_heap_regions();
  97   set_archive_heap_region_fixed();




  54 
  55 address   HeapShared::_narrow_oop_base;
  56 int       HeapShared::_narrow_oop_shift;
  57 
  58 //
  59 // If you add new entries to the following tables, you should know what you're doing!
  60 //
  61 
  62 // Entry fields for shareable subgraphs archived in the closed archive heap
  63 // region. Warning: Objects in the subgraphs should not have reference fields
  64 // assigned at runtime.
  65 static ArchivableStaticFieldInfo closed_archive_subgraph_entry_fields[] = {
  66   {"java/lang/Integer$IntegerCache",           "archivedCache"},
  67   {"java/lang/Long$LongCache",                 "archivedCache"},
  68   {"java/lang/Byte$ByteCache",                 "archivedCache"},
  69   {"java/lang/Short$ShortCache",               "archivedCache"},
  70   {"java/lang/Character$CharacterCache",       "archivedCache"},
  71 };
  72 // Entry fields for subgraphs archived in the open archive heap region.
  73 static ArchivableStaticFieldInfo open_archive_subgraph_entry_fields[] = {
  74   {"jdk/internal/module/ArchivedModuleGraph",  "archivedModuleGraph"},



  75   {"java/util/ImmutableCollections$ListN",     "EMPTY_LIST"},
  76   {"java/util/ImmutableCollections$MapN",      "EMPTY_MAP"},
  77   {"java/util/ImmutableCollections$SetN",      "EMPTY_SET"},
  78   {"java/lang/module/Configuration",           "EMPTY_CONFIGURATION"},
  79 };
  80 
  81 const static int num_closed_archive_subgraph_entry_fields =
  82   sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  83 const static int num_open_archive_subgraph_entry_fields =
  84   sizeof(open_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
  85 
  86 ////////////////////////////////////////////////////////////////
  87 //
  88 // Java heap object archiving support
  89 //
  90 ////////////////////////////////////////////////////////////////
  91 void HeapShared::fixup_mapped_heap_regions() {
  92   FileMapInfo *mapinfo = FileMapInfo::current_info();
  93   mapinfo->fixup_mapped_heap_regions();
  94   set_archive_heap_region_fixed();


< prev index next >