]> git.lizzy.rs Git - rust.git/commit
Auto merge of #86695 - sexxi-goose:closure_size, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 30 Jun 2021 13:42:50 +0000 (13:42 +0000)
committerbors <bors@rust-lang.org>
Wed, 30 Jun 2021 13:42:50 +0000 (13:42 +0000)
commit868c702d0c9a471a28fb55f0148eb1e3e8b1dcc5
tree2a3a27b47444d5901dd93749737c2fc2baca05b6
parent5d34076975cd7661dca4e40e0c66a646a78ad091
parentfc273e9bf2ab4594e8dcdb737b63bffb3f6b08c9
Auto merge of #86695 - sexxi-goose:closure_size, r=nikomatsakis

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 +nightly rustc --lib -- -Zprofile-closures
cargo +nightly rustc --bin {binary_name} -- -Zprofile-closures
```

r? `@nikomatsakis`
compiler/rustc_middle/src/ty/context.rs
compiler/rustc_middle/src/ty/mod.rs
compiler/rustc_typeck/src/check/upvar.rs