Repository navigation
Assorted opt-dist fixes and improvements - #165561
Conversation
Local runs don't emit metrics, trying to update the metrics.json file will always fail.
|
Some changes occurred in src/tools/opt-dist cc @Kobzol |
|
|
There was a problem hiding this comment.
Looks good! Left one nit, you can r=me after (in parallel to the benchmark). We should see Cargo changes in rustc-perf if PGO somehow went sideways.
@bors r+ rollup
@bors try @rust-timer queue
This comment has been minimized.
This comment has been minimized.
Assorted opt-dist fixes and improvements
|
Lol, I told you to r=me and then r+-ed the PR. @bors r- |
|
This pull request was unapproved. |
right now, an opt-dist run starts with: - clear its opt-artifacts folder - copy a rustc-perf tree there - build the collector So, on every run, the built rustc-perf is deleted and rebuilt, even though there is a "prebuilt rustc-perf" configuration. This commit does not rebuild rustc-perf if there's a prebuilt dir, and returning that as the rustc-perf path to run benchmarks in.
Local runs are usually more concerned about optimizing the compiler, so optimizing rustdoc is off by default for these, but it still is on by default otherwise, to keep optimizing it on CI as we do today.
Make optimizing cranelift and clippy off by default for local runs.
The default is still on for CI, because we optimize by default, but off for local runs.
|
Ah fun, I think bors can now read GH reviews, but not rust-timer. @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (fb116aa): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 481.055s -> 481.429s (0.08%) |
|
Same lack of results as the earlier run, on both targets, so this doesn't change behavior, as expected. @bors r=kobzol |
Rollup of 13 pull requests Successful merges: - #164914 (Specialize more builtin types for `<[MaybeUninit<_>]>::write_default()`) - #165078 (Use the `2.38` binutils version in CI) - #165427 (rustdoc: Make implementors collapseable if there is more than one line of docs) - #165444 (Suggest using `ExitCode` instead of calling `exit`) - #165571 (Support mutable captures in move expressions) - #165379 (Autolabel `std::sys` modules) - #165503 (update Enzyme submodule) - #165519 (Update books) - #165534 (rename MIR_borrow_checking timing scope to less confusing name) - #165546 (Expose `str::split_at_[mut_]unchecked` and `OsStr::split_at_unchecked`) - #165561 (Assorted opt-dist fixes and improvements) - #165564 (fix: Remove confusing self-links from Diag docs) - #165570 (fix `-Zvirtual-function-elimination` error message)
Rollup merge of #165561 - lqd:opt-dist, r=kobzol Assorted opt-dist fixes and improvements r? kobzol I've been looking at PGO again, and encountered some issues running `opt-dist` locally: - it currently panics because it seems to expect the metrics file to be always present, so I've made the metrics update optional - it will copy and build rustc-perf every time you run it, even when specifying the "pre-built rustc-perf" config, so I've changed this to only happen if you don't use this pre-built arg. - the recent additions to PGO more tools are mandatory, but it takes a really long time to build all the tools multiple times and run benchmarks, so I've made these opt-in on the CLI for local runs, but they are still on by default for CI runs of course. Since these are a bit random and kind of unrelated, I've kept them in separate commits to make review easier. Note that I've already done a perf run for these changes, and there were no changes in the x64 or aarch64 results. So that's I think at least rustc and rustdoc tested, but I don't know if we can use the perf collector to test everything? (clippy + clif maybe and if so we should do that, but I don't know about cargo itself?)
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
Rollup merge of #165849 - lqd:opt-dist-again, r=Kobzol More opt-dist improvements Following up on #165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
More opt-dist improvements Following up on rust-lang/rust#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
r? kobzol
I've been looking at PGO again, and encountered some issues running
opt-distlocally:Since these are a bit random and kind of unrelated, I've kept them in separate commits to make review easier.
Note that I've already done a perf run for these changes, and there were no changes in the x64 or aarch64 results. So that's I think at least rustc and rustdoc tested, but I don't know if we can use the perf collector to test everything? (clippy + clif maybe and if so we should do that, but I don't know about cargo itself?)