Skip to content

Advanced GC Internals Documentation #7743

@swgillespie

Description

@swgillespie

The Book of the Runtime is a great resource on the GC, but it glosses over the details of many aspects of the GC that are important to understanding how the system works on a deep level. Today, it's very difficult to understand the GC just by looking at the Book of the Runtime alone - it takes a lot of time, reading gc.cpp, and debugging to get a feel for the different aspects of the GC and how they interact.

It would be great if we had centralized, detailed documentation for GC internals in addition to the Book of the Runtime in the hopes of lowering the barrier of entry into the GC.

Some issues where GC internals have been discussed (would be great candidates for documentation!)

Some topics that aren't covered by the BOTR, off the top of my head (would also be great candidates for documentation):

  • Pins in general: how the EE reports things as pinned to the GC, how the Gen 0 allocator deals with pins on the ephemeral segment, the demotion mechanism, pinned plugs and POPO
  • Allocating in condemned generations
  • Free lists - the BOTR mentions that the sweep phase populates free lists but doesn't talk much about how they are used when allocating in higher generations.
  • How to use the GC Log to view GC debug output
  • Joins in Server GC - why they are necessary, hazards associated with unbalanced heaps, measures taken to ensure that each heap has a proportional amount of work to do (e.g. mark stealing, alloc_heap vs. home_heap)

cc @karelz @Maoni0 @adityamandaleeka @sergiy-k

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-GC-coreclrdocumentationDocumentation bug or enhancement, does not impact product or test code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions