< prev index next >

src/hotspot/share/memory/heapShared.cpp

Print this page




 481       // The field value is not preserved in the archived mirror.
 482       // Record the field as a new subGraph entry point. The recorded
 483       // information is restored from the archive at runtime.
 484       subgraph_info->add_subgraph_entry_field(field_offset, af);
 485       Klass *relocated_k = af->klass();
 486       Klass *orig_k = f->klass();
 487       subgraph_info->add_subgraph_object_klass(orig_k, relocated_k);
 488     } else {
 489       // The field contains null, we still need to record the entry point,
 490       // so it can be restored at runtime.
 491       subgraph_info->add_subgraph_entry_field(field_offset, NULL);
 492     }
 493   } else {
 494     ShouldNotReachHere();
 495   }
 496 }
 497 
 498 #define do_module_object_graph(archive_object_graph_do) \
 499   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedSystemModules_offset(), T_OBJECT, CHECK); \
 500   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedModuleFinder_offset(), T_OBJECT, CHECK); \
 501   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedMainModule_offset(), T_OBJECT, CHECK)


 502 
 503 void HeapShared::archive_module_graph_objects(Thread* THREAD) {
 504   do_module_object_graph(archive_reachable_objects_from_static_field);
 505 }
 506 #endif // INCLUDE_CDS_JAVA_HEAP


 481       // The field value is not preserved in the archived mirror.
 482       // Record the field as a new subGraph entry point. The recorded
 483       // information is restored from the archive at runtime.
 484       subgraph_info->add_subgraph_entry_field(field_offset, af);
 485       Klass *relocated_k = af->klass();
 486       Klass *orig_k = f->klass();
 487       subgraph_info->add_subgraph_object_klass(orig_k, relocated_k);
 488     } else {
 489       // The field contains null, we still need to record the entry point,
 490       // so it can be restored at runtime.
 491       subgraph_info->add_subgraph_entry_field(field_offset, NULL);
 492     }
 493   } else {
 494     ShouldNotReachHere();
 495   }
 496 }
 497 
 498 #define do_module_object_graph(archive_object_graph_do) \
 499   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedSystemModules_offset(), T_OBJECT, CHECK); \
 500   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedModuleFinder_offset(), T_OBJECT, CHECK); \
 501   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedMainModule_offset(), T_OBJECT, CHECK); \
 502   archive_object_graph_do(SystemDictionary::ArchivedModuleGraph_klass(), jdk_internal_module_ArchivedModuleGraph::archivedConfiguration_offset(), T_OBJECT, CHECK); \
 503   archive_object_graph_do(SystemDictionary::Configuration_klass(),       java_lang_module_Configuration::EMPTY_CONFIGURATION_offset(), T_OBJECT, CHECK)
 504 
 505 void HeapShared::archive_module_graph_objects(Thread* THREAD) {
 506   do_module_object_graph(archive_reachable_objects_from_static_field);
 507 }
 508 #endif // INCLUDE_CDS_JAVA_HEAP
< prev index next >