JDK-8310160 : Make GC APIs for handling archive heap objects agnostic of GC policy
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2023-06-15
  • Updated: 2024-07-11
  • Resolved: 2024-07-11
Related Reports
Relates :  
Description
Copied from the parent task:

The new APIs would be:

  HeapWord* alloc_archive_space(size_t word_size)
  This would replace allocate_loaded_archive_space() and the G1's alloc_archive_region().

  void fixup_archive_space(MemRegion range)
  This would replace complete_loaded_archive_space() and G1's populate_archive_regions_bot_part().

  void handle_archive_space_failure(MemRegion range)
  This would replace ArchiveHeapLoader::fill_failed_loaded_heap() and G1's dealloc_archive_regions().

At this stage CDS code would also be updated to use Universe::heap() instead of G1CollectedHeap::heap() when calling the GC APIs for mapping the archive space.

CollectedHeap::reserved() would be added to return the reserved heap region so that the calls to G1CollectedHeap::heap()->reserved() can be replaced with Universe::heap()->reserved(). Currently only ZGC does not seem to set CollectedHeap::_reserved which can be addressed later when support for archive objects needs to be added for ZGC.

This task does not update collectors other than G1 to use the new APIs.
Comments
Closing as WNF as this will be solved by JDK-8326035 (CDS Object Streaming)
11-07-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14520 Date: 2023-06-16 14:26:09 +0000
16-06-2023