Skip to content

Commit 5451664

Browse files
authored
Rollup merge of #65891 - michaelwoerister:sp-crate-metadata, r=wesleywiser
self-profiling: Record something more useful for crate metadata generation event. Before this commit, we had an event that would only track the compression step for proc-macros and Rust dylibs. After the commit we measure the time for acutally generating the crate metadata bytes. r? @wesleywiser
2 parents cceefd3 + 46a39a2 commit 5451664

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/librustc/ty/context.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,7 @@ impl<'tcx> TyCtxt<'tcx> {
14081408
}
14091409

14101410
pub fn encode_metadata(self)-> EncodedMetadata {
1411+
let _prof_timer = self.prof.generic_activity("generate_crate_metadata");
14111412
self.cstore.encode_metadata(self)
14121413
}
14131414

src/librustc_codegen_ssa/base.rs

-2
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,6 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
574574

575575
if need_metadata_module {
576576
// Codegen the encoded metadata.
577-
let _prof_timer = tcx.prof.generic_activity("codegen_crate_metadata");
578-
579577
let metadata_cgu_name = cgu_name_builder.build_cgu_name(LOCAL_CRATE,
580578
&["crate"],
581579
Some("metadata")).as_str()

0 commit comments

Comments
 (0)