rust/src
Mark Rousskov a448f88b69 Utilize PGO for rustc linux dist builds
This implements support for applying PGO to the rustc compilation step (not
standard library or any tooling, including rustdoc). Expanding PGO to more tools
is not terribly difficult but will involve more work and greater CI time
commitment.

For the same reason of avoiding greater time commitment, this currently avoids
implementing for platforms outside of x86_64-unknown-linux-gnu, though in
practice it should be quite simple to extend over time to more platforms. The
initial implementation is intentionally minimal here to avoid too much work
investment before we start seeing wins for a subset of Rust users.

The choice of workloads to profile here is somewhat arbitrary, but the general
rationale was to aim for a small set that largely avoided time regressions on
perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and
its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests
are arguably the most controversial, but they benefit those cases (avoiding
regressions) and do not really remove wins from other benchmarks.

The primary next step after this PR lands is to implement support for PGO in
LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so
the approach taken there may need to be more staggered. rustc-only PGO seems
well affordable on linux at least, giving us up to 20% wall time wins on some
crates for 15 minutes of extra CI time (1 hour up from 45 minutes).

The PGO data is uploaded to allow others to reuse it if attempting to reproduce
the CI build or potentially, in the future, on other platforms where an
off-by-one strategy is used for dist builds at minimal performance cost.
2020-12-22 12:23:37 -05:00
..
bootstrap Utilize PGO for rustc linux dist builds 2020-12-22 12:23:37 -05:00
build_helper
ci Utilize PGO for rustc linux dist builds 2020-12-22 12:23:37 -05:00
doc Fix cargo-binutils link 2020-12-13 19:23:16 +08:00
etc
librustdoc Auto merge of #79682 - jyn514:no-blanket-impls, r=Manishearth,GuillaumeGomez 2020-12-16 09:13:14 +00:00
llvm-project@8d78ad1389 Update LLVM submodule 2020-12-09 00:00:00 +00:00
test tests: add run-make-fulldeps split-dwarf test 2020-12-16 10:33:49 +00:00
tools Utilize PGO for rustc linux dist builds 2020-12-22 12:23:37 -05:00
README.md
stage0.txt
version

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.