Skip to content

Fix a bad path and simplify one of the examples #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions posts/inside-rust/2020-02-25-intro-rustc-self-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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:
Expand Down