• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. HotSpot
  4. CDS Archived Heap Improvements

Page History

Versions Compared

Old Version 3

changes.mady.by.user Ioi Lam

Saved on Oct 28, 2020

compared with

New Version 4

changes.mady.by.user Ioi Lam

Saved on Oct 28, 2020

  • Previous Change: Difference between versions 2 and 3
  • Next Change: Difference between versions 4 and 5
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • At VM bootstrap, the ARR array is referenced indirectly by an ArchivedKlassSubGraphInfoRecord, whose root object is stored in the Root List, so it's reachable.
  • Later, when the ArchivedKlassSubGraphInfoRecord is initialized, its root object is removed from the Root List and stored into Java static field (e.g., ArchivedBootLayer. archivedBootLayer), and ARR will be indirectly referenced from there.
  • Later, when ARR is discarded by the HashMap due to table expansion, it is no longer reachable. G1 knows that ARR is dead and will never dereference ARR[n].

Support Archived Heap for other collectors

With the Root List, it should be fairly easy to support Archived Heap for SerialGC and ParallelGC:

  • At VM bootstrap, reserve enough space in the old generation
  • Copy objects in the Open Region and Closed Region into the old generation
    • Relocation may be necessary, since the Open/Closed regions assume that they are mapped to a pre-determined address, which may be different than the location of the old generation
    • There's already code for doing this kind of relocation (see HeapShared::patch_archived_heap_embedded_pointers)
    • The Open/Closed regions may be divided into at most 4 blocks with gaps in between. The easiest way to handle the gaps is to fill them with a dummy array.
  • Even with the copying/patching, the start up time should still be much faster than running without the Archived Heap. Without the Archived Heap, we need to create many expensive data structures (such as the module graph) from scratch, which is very time consuming.
    • G1 with Archived Heap = 32ms
    • G1 without Archived Heap = 57ms
    • Copying/patching = less than 1ms.


Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 170, "requestCorrelationId": "36d954995ba115be"}