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:
|
The basic `perf` command is this:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
perf record -F99 --call-graph dwarf XXX
|
> perf record -F99 --call-graph dwarf XXX
|
||||||
```
|
```
|
||||||
|
|
||||||
The `-F99` tells perf to sample at 99 Hz, which avoids generating too
|
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
|
information from debuginfo, which is accurate. The `XXX` is the
|
||||||
command you want to profile. So, for example, you might do:
|
command you want to profile. So, for example, you might do:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
perf record -F99 --call-graph dwarf cargo +<toolchain> rustc
|
> perf record -F99 --call-graph dwarf cargo +<toolchain> rustc
|
||||||
```
|
```
|
||||||
|
|
||||||
to run `cargo` -- here `<toolchain>` should be the name of the toolchain
|
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:
|
For example, to measure the clap-rs test, you might do:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
> ./target/release/collector \
|
> ./target/release/collector
|
||||||
--output-repo /path/to/place/output \
|
--output-repo /path/to/place/output
|
||||||
profile perf-record
|
profile perf-record
|
||||||
--rustc /path/to/rustc/executable/from/your/build/directory
|
--rustc /path/to/rustc/executable/from/your/build/directory
|
||||||
--cargo `which cargo`
|
--cargo `which cargo`
|
||||||
|
|
@ -179,8 +179,8 @@ would analyze NLL performance.
|
||||||
|
|
||||||
You can install perf-focus using `cargo install`:
|
You can install perf-focus using `cargo install`:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cargo install perf-focus
|
> cargo install perf-focus
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example: How much time is spent in MIR borrowck?
|
### Example: How much time is spent in MIR borrowck?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue