Skip to content

Commit a93c011

Browse files
committed
Add documentation
1 parent d4d352f commit a93c011

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

collector/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,26 @@ versions of `rustc` for individual functions of a single runtime benchmark group
508508

509509
Codegen diff is currently only implemented for runtime benchmarks.
510510

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+
511531
## How `rustc` wrapping works
512532
When a crate is benchmarked or profiled, the real `rustc` is replaced with the `rustc-fake` binary,
513533
which parses commands passed from the `collector` and invokes the actual profiling or benchmarking

0 commit comments

Comments
 (0)