pgo_repdriver

command
v0.48.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Command pgo_repdriver is a representative multi-grammar parsing workload used to (a) collect a CPU profile for Go build-time PGO and (b) produce a stable digest of parsed trees for before/after correctness comparisons. It parses a fixed spread of real-world source files across five grammars (go, c_sharp, bash, python, cmake) pulled from cgo_harness/corpus_real, so the resulting profile reflects real parsing hot paths rather than one grammar's quirks.

The profile collected by this command is the production-corpus input to the checked-in pgo/default.pgo composite. See pgo/README.md for the composition recipe and where the result is wired into the build. From the repo root:

cd cgo_harness && go run ./cmd/build_real_corpus -out corpus_real -langs go,c_sharp,bash,python,cmake && cd ..
go run ./cmd/pgo_repdriver -mode=profile -cpuprofile=pgo/inputs/production-v1.pgo -iterations=1500

cgo_harness/corpus_real is gitignored and rebuilt from grammars/languages.lock via cgo_harness/cmd/build_real_corpus (see cgo_harness/README.md, "Build Real Corpus (Lock-Pinned)") — it is not checked in, so this driver's -corpus flag (or its auto-detection) will fail with a clear error until that corpus has been materialized locally.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL