From e0507c7bcb8ddee1aed07fae43862e6795b353bc Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 10 Sep 2018 14:38:11 -0400 Subject: [PATCH] fix various bash snippets --- src/profiling/with_perf.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/profiling/with_perf.md b/src/profiling/with_perf.md index c851d1a2..7d8276ce 100644 --- a/src/profiling/with_perf.md +++ b/src/profiling/with_perf.md @@ -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 + rustc +```bash +> perf record -F99 --call-graph dwarf cargo + rustc ``` to run `cargo` -- here `` 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?