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 ```
This commit is contained in:
@@ -173,6 +173,25 @@ pub enum Visibility {
|
||||
Invisible,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Debug,
|
||||
PartialEq,
|
||||
Eq,
|
||||
Copy,
|
||||
Hash,
|
||||
TyEncodable,
|
||||
TyDecodable,
|
||||
HashStable,
|
||||
TypeFoldable
|
||||
)]
|
||||
pub struct ClosureSizeProfileData<'tcx> {
|
||||
/// Tuple containing the types of closure captures before the feature `capture_disjoint_fields`
|
||||
pub before_feature_tys: Ty<'tcx>,
|
||||
/// Tuple containing the types of closure captures after the feature `capture_disjoint_fields`
|
||||
pub after_feature_tys: Ty<'tcx>,
|
||||
}
|
||||
|
||||
pub trait DefIdTree: Copy {
|
||||
fn parent(self, id: DefId) -> Option<DefId>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user