Skip to content

Perf: use precise GC checkpoints for materialized quick loops #118

Description

@chrisbbreuer

Parent: #62
Related: #97, #49, #44

Evidence

An 8-second sample of the frozen clean direct object_churn binary shows the fixed-shape quick loop dominating execution. Within GC work, root tracing repeatedly spends time in Visitor.markConservativeWord; stale native-stack words can also conservatively retain/promote dead young cells and increase later old-space work.

The fixed-shape object quick loop is a special safe case: its checkpoint-crossing path already writes the live accumulator/IP to the registered Exec, and the loop writes the array, displaced value, numeric temporaries, fresh object, total, and counter into registered frame slots before the ordinary checkpoint service runs. The helper has returned before advanceQuickObservableSteps services the checkpoint, so no helper-only GC pointer remains live solely in a native local.

Scope

  • Mark only the materialized fixed-shape loop's normal checkpoint crossing as precise.
  • At that checkpoint, trace registered Context/Interpreter/Exec/frame roots but skip the conservative native-stack scan.
  • Preserve conservative scanning for generic VM/tree-walker/native/error paths and for every parallel collector path.
  • Add focused proof that the precise marker is scoped/restored and a nursery collection at such a checkpoint preserves the exact live graph.
  • Measure frozen-binary order-balanced A/B for direct and warmed eight-context object churn; shared mode must remain byte-identical/unaffected.

Acceptance

  • Improve direct and warmed-independent object churn without checksum or semantic changes; do not regress other benchmark rows.
  • Preserve exact step/safepoint counts, OOM/termination behavior, GC reachability, weak/finalization behavior, and all generic conservative-scan coverage.
  • Pass focused VM/GC tests and the final batched normal/TSan gates.
  • Publish clean full-matrix results and update README/docs only after all gates pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions