From f4112ee9b655027dc9526c529f074e6f15fe044a Mon Sep 17 00:00:00 2001 From: Mattias Petersson Date: Sun, 28 Dec 2025 16:56:17 +0100 Subject: [PATCH] Fix commit according to PR review Changed so cargo specifies the binary collector, removing the need to link to its local binary. Clarified that the SHAs should be from the rustc-repo, but the command should be ran in the rustc-perf repo. --- src/doc/rustc-dev-guide/src/profiling/with_rustc_perf.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/doc/rustc-dev-guide/src/profiling/with_rustc_perf.md b/src/doc/rustc-dev-guide/src/profiling/with_rustc_perf.md index 19935d3d262f..7c7639a1ac3d 100644 --- a/src/doc/rustc-dev-guide/src/profiling/with_rustc_perf.md +++ b/src/doc/rustc-dev-guide/src/profiling/with_rustc_perf.md @@ -34,15 +34,16 @@ To start, in the `rustc-perf` repo, build the collector, which runs the Rust com ``` cargo build --release -p collector ``` -After this the collector can be located in `.\target\release\collector`, can be run locally with `bench_local` and expects the following arguments: +The collector can then be run using cargo, specifying the collector binary. It expects the following arguments: - ``: Profiler selection for how performance should be measured. For this example we will use Cachegrind. - ``: The Rust compiler revision to benchmark, specified as a commit SHA from `rust-lang/rust`. -Optional arguments allow running profiles and scenarios as described above. `--include` in `x perf` is instead `--exact-match`. More information regarding the mandatory and +Optional arguments allow running profiles and scenarios as described above. More information regarding the mandatory and optional arguments can be found in the [rustc-perf-readme-profilers]. -Then, for the case of generating a profile diff for the crate `serve_derive-1.0.136`, for two commits `` and `` in the `rust-lang/rust` repository, run the following +Then, for the case of generating a profile diff for the crate `serve_derive-1.0.136`, for two commits `` and `` from the `rust-lang/rust` repository, +run the following in the `rustc-perf` repo: ``` -./target/release/collector profile_local cachegrind + --rustc2 + --exact-match serde_derive-1.0.136 --profiles Check --scenarios IncrUnchanged +cargo run --release --bin collector profile_local cachegrind + --rustc2 + --exact-match serde_derive-1.0.136 --profiles Check --scenarios IncrUnchanged ```