Skip to content

Commit ad84934

Browse files
committed
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.
1 parent 22e241e commit ad84934

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_metadata/src/creader.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,8 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
397397
name: Symbol,
398398
private_dep: Option<bool>,
399399
) -> Result<CrateNum, CrateError> {
400-
let _prof_timer = self.sess.prof.generic_activity("metadata_register_crate");
400+
let _prof_timer =
401+
self.sess.prof.generic_activity_with_arg("metadata_register_crate", name.as_str());
401402

402403
let Library { source, metadata } = lib;
403404
let crate_root = metadata.get_root();

0 commit comments

Comments
 (0)