diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-28 21:36:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-28 21:36:07 +0100 |
| commit | 545166435cfcc10bb5665c693566e012834d4093 (patch) | |
| tree | 27d2026e04c44a898b32b6a7ab3aed7136cf68cc | |
| parent | cceefd3d98bc2d6e2e1912b63055d3c1b1647a97 (diff) | |
| parent | 46a39a2d424cefb2d0c56fae9682cfa253a79d47 (diff) | |
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
| -rw-r--r-- | src/librustc/ty/context.rs | 1 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/base.rs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 0f7d5d9a25e..bdf9b2d7f3f 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -1408,6 +1408,7 @@ impl<'tcx> TyCtxt<'tcx> { } pub fn encode_metadata(self)-> EncodedMetadata { + let _prof_timer = self.prof.generic_activity("generate_crate_metadata"); self.cstore.encode_metadata(self) } diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs index bf687f84635..ee4ec7fb41e 100644 --- a/src/librustc_codegen_ssa/base.rs +++ b/src/librustc_codegen_ssa/base.rs @@ -574,8 +574,6 @@ pub fn codegen_crate<B: ExtraBackendMethods>( if need_metadata_module { // Codegen the encoded metadata. - let _prof_timer = tcx.prof.generic_activity("codegen_crate_metadata"); - let metadata_cgu_name = cgu_name_builder.build_cgu_name(LOCAL_CRATE, &["crate"], Some("metadata")).as_str() |
