fix various bash snippets
This commit is contained in:
parent
b63805f74e
commit
e0507c7bcb
|
|
@ -27,8 +27,8 @@ of events, though, like cache misses and so forth.
|
|||
|
||||
The basic `perf` command is this:
|
||||
|
||||
```
|
||||
perf record -F99 --call-graph dwarf XXX
|
||||
```bash
|
||||
> perf record -F99 --call-graph dwarf XXX
|
||||
```
|
||||
|
||||
The `-F99` tells perf to sample at 99 Hz, which avoids generating too
|
||||
|
|
@ -38,8 +38,8 @@ activity). The `--call-graph dwarf` tells perf to get call-graph
|
|||
information from debuginfo, which is accurate. The `XXX` is the
|
||||
command you want to profile. So, for example, you might do:
|
||||
|
||||
```
|
||||
perf record -F99 --call-graph dwarf cargo +<toolchain> rustc
|
||||
```bash
|
||||
> perf record -F99 --call-graph dwarf cargo +<toolchain> rustc
|
||||
```
|
||||
|
||||
to run `cargo` -- here `<toolchain>` should be the name of the toolchain
|
||||
|
|
@ -74,9 +74,9 @@ do profiling for you! You can find
|
|||
|
||||
For example, to measure the clap-rs test, you might do:
|
||||
|
||||
```
|
||||
> ./target/release/collector \
|
||||
--output-repo /path/to/place/output \
|
||||
```bash
|
||||
> ./target/release/collector
|
||||
--output-repo /path/to/place/output
|
||||
profile perf-record
|
||||
--rustc /path/to/rustc/executable/from/your/build/directory
|
||||
--cargo `which cargo`
|
||||
|
|
@ -179,8 +179,8 @@ would analyze NLL performance.
|
|||
|
||||
You can install perf-focus using `cargo install`:
|
||||
|
||||
```
|
||||
cargo install perf-focus
|
||||
```bash
|
||||
> cargo install perf-focus
|
||||
```
|
||||
|
||||
### Example: How much time is spent in MIR borrowck?
|
||||
|
|
|
|||
Loading…
Reference in New Issue