Skip to content

Commit

Permalink
Rollup merge of rust-lang#122605 - osiewicz:metadata-register-crate-s…
Browse files Browse the repository at this point in the history
…tore-crate-name-in-profile, r=Nadrieril

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.
  • Loading branch information
fmease committed Mar 16, 2024
2 parents 53515f3 + ad84934 commit caa6131
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_metadata/src/creader.rs
Expand Up @@ -398,7 +398,8 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
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();
Expand Down

0 comments on commit caa6131

Please sign in to comment.