Rollup merge of #90701 - michaelwoerister:more-artifact-sizes, r=davidtwco
Record more artifact sizes during self-profiling. This PR adds artifact size recording for - "linked artifacts" (executables, RLIBs, dylibs, static libs) - object files - dwo files - assembly files - crate metadata - LLVM bitcode files - LLVM IR files - codegen unit size estimates Currently the identifiers emitted for these are hard-coded as string literals. Is it worth adding constants to https://github.com/rust-lang/measureme/blob/master/measureme/src/rustc.rs instead? We don't do that for query names and the like -- but artifact kinds might be more stable than query names.
This commit is contained in:
commit
fd5a4f42ad
4 changed files with 73 additions and 0 deletions
|
@ -2193,5 +2193,8 @@ fn encode_metadata_impl(tcx: TyCtxt<'_>) -> EncodedMetadata {
|
|||
result[header + 2] = (pos >> 8) as u8;
|
||||
result[header + 3] = (pos >> 0) as u8;
|
||||
|
||||
// Record metadata size for self-profiling
|
||||
tcx.prof.artifact_size("crate_metadata", "crate_metadata", result.len() as u64);
|
||||
|
||||
EncodedMetadata { raw_data: result }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue