Skip to content

perf(gpu): count what a list asks for already current - #308

Merged
pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
GDemay:perf/skipped-refresh-counter
Nov 26, 2026
Merged

pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
GDemay:perf/skipped-refresh-counter

Conversation

@GDemay

@GDemay GDemay commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

The copystat line has always printed its skipped counters, from numbers nothing ever counted: C::Skipped and C::SkippedBytes are defined in copystat.rs and printed in the "copies per frame" line, with no increment site anywhere in the tree.

This wires them where they belong: the asks that return early in Batch::add — a later list asking for a copy the submission already brought up to date. That is the interesting number in-game now:

  • what staying current saves the later lists of a submission (the world submission asks for every copy its heaps' views and page tables reach, ~9,000, and copies it once);
  • and after perf(gpu): preserve unrelated refreshes across overlapping copies #259, what a Step::Move keeps across what a Step::Run used to make due again — the skipped line is the direct in-game read-out of the bytes its preservation saved.

The counters stay diagnostics-gated as the line they feed; nothing on the release path changes.

Verification

  • New test host::batch::a_still_current_ask_is_counted_skipped (diagnostics lane, Windows-side as the whole host module is): a real copy of plain memory, a flush that makes it current, the ask again — counted with its bytes; runs under Wine: WINE=/opt/homebrew/bin/wine tools/macos/test-wine.sh -p victory-gpu --features diagnostics a_still_current_ask → 1 passed.
  • Full Wine diagnostics lane: 366 passed / 2 failed / 12 ignored — the two failures are the pre-existing feat(gpu): add opt-in mach_vm_remap zero-copy title buffer aliasing #207 alias tests, failing identically on clean main.
  • Wine plain lane: 348 / 2 / 11 — same two pre-existing failures only.
  • Native suite 541 / 0 / 17 (unchanged); cargo build -p victory-gpu --target x86_64-pc-windows-gnullvm green; clippy on both feature lanes, the CI-faithful target, exit 0.
  • perfops/bench.sh: one REG?-flagged run proved machine-state noise (guard 25.2→9.9 µs, tex bc1 254.6→112.9 ns on the immediate re-run; the change is a cfg-gated counter add that the release benches never execute).

The copystat line has always printed "{skips} skipped {MB} MB", from
counters nothing ever counted. The asks that return early in
`Batch::add` — what a later list asks for a copy the submission
already brought up to date — are that number, and the interesting one
in-game: what staying current saved the later lists, and so what
pragyaangaur#259's moves now keep.

Co-Authored-By: GLM 5.3 <noreply@z.ai>
@pragyaangaur
pragyaangaur merged commit 3c74e44 into pragyaangaur:main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants