1
Fork 0

Record more artifact sizes during self-profiling.

This commit is contained in:
Michael Woerister 2021-11-08 16:59:36 +01:00
parent 3e3890c9d4
commit fefe1e9192
4 changed files with 73 additions and 0 deletions

View file

@ -2187,5 +2187,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 }
}