rustc-metadata: Store crate name in self-profile of metadata_register_crate

When profiling a build of Zed, I found myself in need of names of crates that take the longest to register in downstream crates.
This commit is contained in:
Piotr Osiewicz 2024-03-16 21:35:10 +01:00
parent 22e241e32e
commit ad84934e6f

View File

@ -397,7 +397,8 @@ fn register_crate(
name: Symbol,
private_dep: Option<bool>,
) -> Result<CrateNum, CrateError> {
let _prof_timer = self.sess.prof.generic_activity("metadata_register_crate");
let _prof_timer =
self.sess.prof.generic_activity_with_arg("metadata_register_crate", name.as_str());
let Library { source, metadata } = lib;
let crate_root = metadata.get_root();