diff options
| author | Aman Arora <me@aman-arora.com> | 2021-05-05 15:57:08 -0400 |
|---|---|---|
| committer | Aman Arora <me@aman-arora.com> | 2021-06-28 14:21:55 -0400 |
| commit | fc273e9bf2ab4594e8dcdb737b63bffb3f6b08c9 (patch) | |
| tree | 5d4c81800d048385b8b3d24b8f70bad4ad03bdae /compiler/rustc_interface/src | |
| parent | 3e9d7ecf784e5ecaf7437d04be3992ad23fa7cb6 (diff) | |
| download | rust-fc273e9bf2ab4594e8dcdb737b63bffb3f6b08c9.tar.gz rust-fc273e9bf2ab4594e8dcdb737b63bffb3f6b08c9.zip | |
Introduce -Zprofile-closures to evaluate the impact of 2229
This creates a CSV with name "closure_profile_XXXXX.csv", where the variable part is the process id of the compiler. To profile a cargo project you can run one of the following depending on if you're compiling a library or a binary: ``` cargo +stage1 rustc --lib -- -Zprofile-closures cargo +stage1 rustc --bin -- -Zprofile-closures ```
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index ebd18630e4e..b252409a92a 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -654,6 +654,7 @@ fn test_debugging_options_tracking_hash() { untracked!(perf_stats, true); // `pre_link_arg` is omitted because it just forwards to `pre_link_args`. untracked!(pre_link_args, vec![String::from("abc"), String::from("def")]); + untracked!(profile_closures, true); untracked!(print_link_args, true); untracked!(print_llvm_passes, true); untracked!(print_mono_items, Some(String::from("abc"))); |
