From f2118fd55b7ce075c6244cb5bf3b14fa7866a3e5 Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Tue, 25 Feb 2020 16:35:24 -0500 Subject: [PATCH] Fix a bad path and simplify one of the examples --- posts/inside-rust/2020-02-25-intro-rustc-self-profile.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/posts/inside-rust/2020-02-25-intro-rustc-self-profile.md b/posts/inside-rust/2020-02-25-intro-rustc-self-profile.md index 83234a4cb..cc7401e43 100644 --- a/posts/inside-rust/2020-02-25-intro-rustc-self-profile.md +++ b/posts/inside-rust/2020-02-25-intro-rustc-self-profile.md @@ -208,11 +208,10 @@ Which shows this `optimized_mir` query was processing the `regex::compile::{{imp By using the `RUSTFLAGS` environment variable, we can profile every `rustc` invocation, not just the final crate's. `crox` can then combine all of the profiles together into one output file. -Since this will create a lot of files, we'll first create a folder to put all the traces in. +Since this will create a lot of files, we'll tell `rustc` to create a folder to put all the traces in. ```sh $ rm regex-17088.* regex-23649.* # clean up the old trace files since we're done with them -$ mkdir profiles $ cargo clean $ RUSTFLAGS="-Zself-profile=./profiles -Zself-profile-events=default,args" cargo build ``` @@ -221,7 +220,7 @@ This creates quite a few trace files in the working directory. Now, we'll tell `crox` to combine all of the trace files in the current directory together: ```sh -$ crox --dir . +$ crox --dir profiles ``` Opening this file shows all of the crates compiled: