File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,26 @@ versions of `rustc` for individual functions of a single runtime benchmark group
508
508
509
509
Codegen diff is currently only implemented for runtime benchmarks.
510
510
511
+ ## Binary size statistics
512
+ You can use the ` binary_stats ` command to display size statistics (section and symbol sizes) of
513
+ binary artifacts (executables, libraries) of selected compile benchmarks.
514
+
515
+ ```
516
+ ./target/release/collector binary_stats `<rustc>` --include <benchmark name> \
517
+ [--profile <Debug|Opt>] \
518
+ [--backend <Llvm|Cranelift>]
519
+ ```
520
+
521
+ You can also compare (diff) the size statistics between two compilers:
522
+ ```
523
+ ./target/release/collector binary_stats `<rustc>` --include <benchmark name> --rustc2 <rustc2>
524
+ ```
525
+ or between two codegen backends:
526
+ ```
527
+ ./target/release/collector binary_stats `<rustc>` --include <benchmark name> --rustc2 <rustc>
528
+ --backend <Llvm|Cranelift> --backend2 <Llvm|Cranelift>
529
+ ```
530
+
511
531
## How ` rustc ` wrapping works
512
532
When a crate is benchmarked or profiled, the real ` rustc ` is replaced with the ` rustc-fake ` binary,
513
533
which parses commands passed from the ` collector ` and invokes the actual profiling or benchmarking
You can’t perform that action at this time.
0 commit comments