提交 8ee9322c 编写于 作者: C Camille GILLOT

Also profile finishing the encoding.

上级 df24315d
......@@ -49,7 +49,7 @@ pub fn save_dep_graph(tcx: TyCtxt<'_>) {
},
move || {
sess.time("incr_comp_persist_dep_graph", || {
if let Err(err) = tcx.dep_graph.encode() {
if let Err(err) = tcx.dep_graph.encode(&tcx.sess.prof) {
sess.err(&format!(
"failed to write dependency graph to `{}`: {}",
staging_dep_graph_path.display(),
......
......@@ -789,8 +789,12 @@ pub fn print_incremental_info(&self) {
}
}
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 {
......
......@@ -304,7 +304,8 @@ pub(crate) fn send(
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()
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册