diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-22 19:33:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-22 19:33:56 +0200 |
| commit | 162120b4fa85639960c9fc28cb7c9444c20e5017 (patch) | |
| tree | fbdf602b41935880363bd9ed03d72034ec8ae698 /compiler/rustc_pattern_analysis/src/constructor.rs | |
| parent | f3ced9d5406d83bb8b300603da494cd67a85dad3 (diff) | |
| parent | 0bd58d8122aa6b6a1ed0a2db6c6a4c5f55ae75c2 (diff) | |
| download | rust-162120b4fa85639960c9fc28cb7c9444c20e5017.tar.gz rust-162120b4fa85639960c9fc28cb7c9444c20e5017.zip | |
Rollup merge of #126318 - Kobzol:bootstrap-perf, r=onur-ozkan
Add a `x perf` command for integrating bootstrap with `rustc-perf` This PR adds a new `x perf` command to bootstrap. The idea is to let rustc developers profile (`profile_local`) and benchmark (`bench_local`) a stage1/stage2 compiler directly from within `rust`. Before, if you wanted to use `rustc-perf`, you had to clone it, set it up, copy the `rustc` sysroot after every change to `rust` etc. This is an attempt to automate that. I opened this PR mostly for discussion. My idea is to offer an interface that looks something like this (a random sample of commands): ```bash x perf --stage 2 profile eprintln x perf --stage1 profile cachegrind x perf benchmark --id baseline x perf benchmark --id after-edit x perf cmp baseline after-edit ``` In this PR, I'd like to only implement the simplest case (`profile_local (eprintln)`), because that only requires a single sysroot (you don't compare anything), and it's relatively easy to set up. Also, I'd like to avoid forcing developers to deal with the rustc-perf UI, so more complex use-cases (like benchmarking two sysroots and comparing the results) should probably wait for https://github.com/rust-lang/rustc-perf/issues/1734 (which is hopefully coming along soon-ish). I'm not sure if it's better to do this in bootstrap directly, or if I should create some shim tool that will receive a `rustc` sysroot, and offer a simplified CLI on top of `rustc-perf`. ## Why is a separate CLI needed? We definitely need to add some support to bootstrap to automate preparing `rustc-perf` and the `rustc` sysroot, but in theory after that we could just let people invoke `rustc-perf` manually. While that is definitely possible, you'd need to manually figure out where is your sysroot located, which seems annoying to me. The `rustc-perf` CLI is also relatively complex, and for this use-case it makes sense to only use a subset of it. So I thought that it would be better to offer a simplified interface on top of it that would make life easier for contributors. But maybe it's not worth it. CC `@onur-ozkan`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
0 files changed, 0 insertions, 0 deletions
