Skip to content

Commit def606c

Browse files
committed
Add documentation of runtime profiling
1 parent 37c38a8 commit def606c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

collector/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,15 @@ profilers whose results are not affected by system noise (e.g. `callgrind` or `e
475475
`RUST_LOG=debug` can be specified to enable verbose logging, which is useful
476476
for debugging `collector` itself.
477477

478+
## Profiling runtime benchmarks
479+
It is also possible to profile runtime benchmarks using the following command:
480+
481+
```
482+
./target/release/collector profile_runtime <PROFILER> <RUSTC> <BENCHMARK_NAME>
483+
```
484+
485+
Currently, a `<PROFILER>` can be `cachegrind`, which will run the runtime benchmark under
486+
`Cachegrind`.
478487

479488
## How `rustc` wrapping works
480489
When a crate is benchmarked or profiled, the real `rustc` is replaced with the `rustc-fake` binary,

0 commit comments

Comments
 (0)