diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-23 13:19:42 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-30 18:10:08 +0200 |
| commit | 8ee9322c1041bcbaee408961727c4418bd792979 (patch) | |
| tree | 2b40b5a6bf782287594872b78a703e3fe6663659 /compiler/rustc_query_system | |
| parent | df24315ddf0103a5f9ecd8d3cd15e069e3571a53 (diff) | |
| download | rust-8ee9322c1041bcbaee408961727c4418bd792979.tar.gz rust-8ee9322c1041bcbaee408961727c4418bd792979.zip | |
Also profile finishing the encoding.
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/serialized.rs | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index f92ee85f62e..7a0fc320663 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -789,8 +789,12 @@ impl<K: DepKind> DepGraph<K> { } } - pub fn encode(&self) -> FileEncodeResult { - if let Some(data) = &self.data { data.current.encoder.steal().finish() } else { Ok(()) } + pub fn encode(&self, profiler: &SelfProfilerRef) -> FileEncodeResult { + if let Some(data) = &self.data { + data.current.encoder.steal().finish(profiler) + } else { + Ok(()) + } } fn next_virtual_depnode_index(&self) -> DepNodeIndex { diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs index 27f7e5730a7..1e34b14d906 100644 --- a/compiler/rustc_query_system/src/dep_graph/serialized.rs +++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs @@ -304,7 +304,8 @@ impl<K: DepKind + Encodable<FileEncoder>> GraphEncoder<K> { self.status.lock().encode_node(&node, &self.record_graph) } - pub fn finish(self) -> FileEncodeResult { + pub fn finish(self, profiler: &SelfProfilerRef) -> FileEncodeResult { + let _prof_timer = profiler.generic_activity("incr_comp_encode_dep_graph"); self.status.into_inner().finish() } } |
