@@ -69,7 +69,7 @@ The following command runs the benchmark suite using a local rustc:
69
69
It will benchmark the entire suite and put the results in a SQLite database
70
70
file called ` results.db ` . The full benchmark suite takes hours to run, but the
71
71
time can be reduced greatly by using the options below to reduce the number of
72
- benchmarks, runs , or builds . Progress output is printed to stderr.
72
+ benchmarks, profiles , or scenarios . Progress output is printed to stderr.
73
73
74
74
The following arguments are mandatory.
75
75
@@ -95,18 +95,15 @@ The following options alter the behaviour of the `bench_local` subcommand.
95
95
- ` --bench-rustc ` : there is a special ` rustc ` benchmark that involves
96
96
downloading a recent Rust compiler and measuring the time taken to compile
97
97
it. This benchmark works very differently to all the other benchmarks. For
98
- example, ` --runs ` and ` --builds ` don't affect it, and the given ` ID ` is used
99
- as the ` rust-lang/rust ` ref (falling back to ` HEAD ` if the ` ID ` is not a
100
- valid ref). It is for advanced and CI use only. This option enables it.
101
- - ` --builds <BUILDS> ` : the build kinds to be benchmarked. The possible choices
102
- are one or more (comma-separated) of ` Check ` , ` Debug ` , ` Doc ` , ` Opt ` , and
103
- ` All ` . The default is ` Check,Debug,Opt ` .
98
+ example, ` --profiles ` and ` --scenarios ` don't affect it, and the given ` ID `
99
+ is used as the ` rust-lang/rust ` ref (falling back to ` HEAD ` if the ` ID ` is
100
+ not a valid ref). It is for advanced and CI use only. This option enables it.
104
101
- ` --cargo <CARGO> ` : a path (relative or absolute) to a Cargo executable that
105
102
will be used to build the benchmarks. By default, the nightly Cargo installed
106
103
by ` rustup ` will be used. This is usually fine, though in rare cases it may
107
104
cause local results to not exactly match production results, because Cargo
108
105
sometimes begins passing (or stops passing) various flags to rustc.
109
- - ` --db $ DATABASE ` : a path (relative or absolute) to a sqlite database file in
106
+ - ` --db < DATABASE> ` : a path (relative or absolute) to a sqlite database file in
110
107
which the timing data will be placed. It will be created if it does not
111
108
already exist. The default is ` results.db ` . Alternatively, the collector
112
109
supports postgres as a backend and the URL can be specified (beginning with
@@ -121,16 +118,19 @@ The following options alter the behaviour of the `bench_local` subcommand.
121
118
comma-separated list of benchmark names. When this option is specified, a
122
119
benchmark is included in the run only if its name matches one or more of the
123
120
given names.
124
- - ` --runs $RUNS ` : the run kinds to be benchmarked. The possible choices are one
125
- or more (comma-separated) of ` Full ` , ` IncrFull ` , ` IncrUnchanged ` ,
126
- ` IncrPatched ` , and ` All ` . The default is ` All ` . Note that ` IncrFull ` is
127
- always run (even if not requested) if either of ` IncrUnchanged ` or
128
- ` IncrPatched ` are run.
121
+ - ` --profiles <PROFILES> ` : the profiles to be benchmarked. The possible choices
122
+ are one or more (comma-separated) of ` Check ` , ` Debug ` , ` Doc ` , ` Opt ` , and
123
+ ` All ` . The default is ` Check,Debug,Opt ` .
129
124
- ` --rustdoc <RUSTDOC> ` : a path (relative or absolute) to a rustdoc
130
- executable that will be benchmarked (but only if a ` Doc ` build is requested
131
- with ` --builds ` ). If a ` Doc ` build is requested, by default the tool will
125
+ executable that will be benchmarked (but only if a ` Doc ` profile is requested
126
+ with ` --profiles ` ). If a ` Doc ` profile is requested, by default the tool will
132
127
look for a rustdoc executable next to the rustc specified via the ` <RUSTC> `
133
128
argument.
129
+ - ` --scenarios <SCENARIOS> ` : the scenarios to be benchmarked. The possible
130
+ choices are one or more (comma-separated) of ` Full ` , ` IncrFull ` ,
131
+ ` IncrUnchanged ` , ` IncrPatched ` , and ` All ` . The default is ` All ` . Note that
132
+ ` IncrFull ` is always run if either of ` IncrUnchanged ` or ` IncrPatched ` are
133
+ run (even if not requested).
134
134
- ` --self-profile ` : use rustc's ` -Zself-profile ` option to produce
135
135
query/function tables in the output. The ` measureme ` tool must be installed
136
136
for this to work.
@@ -189,14 +189,14 @@ Finally, while most of the options you can pass to the collector are supported,
189
189
the profilers used in the ` profile_local ` command are not. In Windows, the only currently supported
190
190
profiler is the ` self-profiler ` .
191
191
192
- As a complete example, let's run just the ` regex ` benchmark in the ` Debug ` build with
193
- self-profiling results available:
192
+ As a complete example, let's run just the ` regex ` benchmark in the ` Debug `
193
+ profile with self-profiling results available:
194
194
195
195
``` pwsh
196
196
$env:XPERF="C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\xperf.exe"
197
197
$env:TRACELOG="C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\tracelog.exe"
198
- .\target\release\collector.exe bench_local $env:RUST_ORIGINAL --id Original --builds Debug --include regex --self-profile
199
- .\target\release\collector.exe bench_local $env:RUST_MODIFIED --id Modified --builds Debug --include regex --self-profile
198
+ .\target\release\collector.exe bench_local $env:RUST_ORIGINAL --id Original --profiles Debug --include regex --self-profile
199
+ .\target\release\collector.exe bench_local $env:RUST_MODIFIED --id Modified --profiles Debug --include regex --self-profile
200
200
.\target\release\site.exe .\results.db
201
201
```
202
202
@@ -368,8 +368,8 @@ The mandatory `<PROFILER>` argument must be one of the following.
368
368
a tool for finding code bloat.
369
369
- ** Slowdown** . It Is likely to run faster than normal compilation.
370
370
- ** Output** . Human-readable output is written to files with an ` ll ` prefix.
371
- - ** Notes** . Does not work with the ` Check ` build kind . Also does not work
372
- with the ` IncrFull ` , ` IncrUnchanged ` , and ` IncrPatched ` run kinds .
371
+ - ** Notes** . Does not work with the ` Check ` profile . Also does not work
372
+ with the ` IncrFull ` , ` IncrUnchanged ` , and ` IncrPatched ` scenarios .
373
373
- ` llvm-ir ` : Dump rustc-generated LLVM IR (before any LLVM passes)
374
374
- Purpose. This command provides access to the raw LLVM IR rustc produces,
375
375
which can be used for targeted improvements to functions (e.g., those
@@ -383,14 +383,14 @@ The mandatory `<PROFILER>` argument must be one of the following.
383
383
- ** Purpose** . This is useful to investigate changes in CGU partionining.
384
384
- ** Slowdown** . Equivalent to normal compilation.
385
385
- ** Output** . File per CGU, currently, placed in a directory inside results.
386
- - ** Notes** . Will likely work best with ` Full ` builds , on either Debug or Opt
387
- profiles.
386
+ - ** Notes** . Will likely work best with the ` Full ` scenario , on either
387
+ ` Debug ` or ` Opt ` profiles.
388
388
- ` dep-graph ` : Dump the incremental dependency graph (as produced by
389
389
-Zdump-dep-graph).
390
390
- ** Purpose** . This is useful when debugging changes to incremental behavior.
391
391
- ** Slowdown** . Equivalent to normal compilation.
392
392
- ** Output** . .dot and .txt file (.txt likely is what you want to see first).
393
- - ** Notes** . Works primarily with incremental compilation kinds .
393
+ - ** Notes** . Works primarily with incremental compilation scenarios .
394
394
395
395
The mandatory ` <RUSTC> ` argument is a path to a rustc executable or a
396
396
` + ` -prefixed toolchain specifier, the same as for ` bench_local ` .
@@ -401,21 +401,21 @@ fashion to the one chosen for `bench_local`.
401
401
### Profiling options
402
402
403
403
The following options alter the behaviour of the ` profile_local ` subcommand.
404
- - ` --builds <BUILDS> ` : as for ` bench_local ` .
405
404
- ` --cargo <CARGO> ` : as for ` bench_local ` .
406
405
- ` --exclude <EXCLUDE> ` : as for ` bench_local ` .
407
406
- ` --id <ID> ` : an identifer that will form part of the output filenames.
408
407
- ` --include <INCLUDE> ` : as for ` bench_local ` .
409
408
- ` --out-dir <OUT_DIR> ` : a path (relative or absolute) to a directory in
410
409
which the output will be placed. If the directory doesn't exist, it will be
411
410
created. The default is ` results/ ` .
412
- - ` --runs <RUNS > ` : as for ` bench_local ` .
411
+ - ` --profiles <PROFILES > ` : as for ` bench_local ` .
413
412
- ` --rustc2 <RUSTC> ` : if given, profiles a second Rust compiler for comparison
414
413
against the first. If a non-toolchain identifier is being used, a ` 1 ` will be
415
414
appended to the identifier for the first run and a ` 2 ` will be appended to
416
415
the identifier for the second run. If the profiler being used is Cachegrind,
417
416
diff files will also be produced.
418
417
- ` --rustdoc <RUSTDOC> ` as for ` bench_local ` .
418
+ - ` --scenarios <SCENARIOS> ` : as for ` bench_local ` .
419
419
420
420
` RUST_LOG=debug ` can be specified to enable verbose logging, which is useful
421
421
for debugging ` collector ` itself.
0 commit comments