5 Commits
Author SHA1 Message Date
Etienne PerotandgVisor bot 3f0c7ccf85 PGO: Add make target to refresh profiles for PGO.
This runs all benchmarks tagged as PGO-enabled, of which there is
currently just one for simplicity (the ffmpeg benchmark). All other
benchmarks are initially tagged out of PGO. I will send a different
change to enroll other benchmarks in PGO.

The make target runs each such benchmark and gathers profiles for each
benchmark. Multiple profile files for multiple runs of the same benchmark
are merged into one, then compared against the existing checked-in profile
used for PGO builds (which right now doesn't exist). If such a profile
doesn't exist or differs widely from the freshly-collected profile, then
this new profile is copied into the repository.

Such profiles are not used at all in builds yet, this is just the glue
that keeps them fresh in the repo.

PiperOrigin-RevId: 714311978
2025-01-10 19:44:15 -08:00
Etienne PerotandgVisor bot 92c1208157 profiletool: Add subcommand to check for similarity between two profiles.
This is meant to be used as part of a pipeline to refresh the profiles used
for PGO builds. This is used to quantify how similar the profiles are to
existing checked-in profiles. If they are similar enough, then the checked-in
profiles do not need to be updated.

PiperOrigin-RevId: 700788407
2024-11-27 13:17:41 -08:00
Etienne PerotandgVisor bot 81f564835e profiletool: Use better compression ratio when writing profiles.
The Go profile library only writes compressed profiles using the "best
speed" (i.e. largest size) compression ratio setting, and does not have
a way to set it. This change avoids calling the Go profile library's
default compression code and writes it uncompressed, piped to a writer
with the same compression algorithm but higher compression ratio.

This is useful because this tool is meant to be used to process profiles
before they are checked into the repository (so that they are available at
build time for PGO builds). Since they are checked in the repo, we need to
minimize their size to keep the repository size small.

PiperOrigin-RevId: 651613043
2024-07-11 19:42:10 -07:00
Etienne PerotandgVisor bot 70bcf5d91b profiletool merge: Support walking through directories of profiles.
This allows the tool to recursively merge a directory full of N profiles,
as opposed to needing each profile to be explicitly listed on the command
line.

The intent is to run this as part of the build system for PGO builds, such
that individual profiles can exist in the repo but get merged at compile
time.

PiperOrigin-RevId: 650441896
2024-07-08 18:47:39 -07:00
Etienne PerotandgVisor bot a5fbf8ba58 Create tool to merge profiles together and compact them.
This will be useful for PGO builds in order to generate a single profile
that can span the results of multiple benchmarks.

PiperOrigin-RevId: 648495580
2024-07-01 15:01:17 -07:00