Skip to content

Commit cde366d

Browse files
Add some more info to -Zincremental-info
1 parent 71274ac commit cde366d

File tree

1 file changed

+11
-0
lines changed
  • src/librustc_incremental/persist

1 file changed

+11
-0
lines changed

src/librustc_incremental/persist/save.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ pub fn save_dep_graph<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
4444

4545
let mut builder = DefIdDirectoryBuilder::new(tcx);
4646
let query = tcx.dep_graph.query();
47+
48+
if tcx.sess.opts.debugging_opts.incremental_info {
49+
println!("incremental: {} nodes in dep-graph", query.graph.len_nodes());
50+
println!("incremental: {} edges in dep-graph", query.graph.len_edges());
51+
}
52+
4753
let mut hcx = HashContext::new(tcx, incremental_hashes_map);
4854
let preds = Predecessors::new(&query, &mut hcx);
4955
let mut current_metadata_hashes = FxHashMap();
@@ -179,6 +185,11 @@ pub fn encode_dep_graph(preds: &Predecessors,
179185
.collect(),
180186
};
181187

188+
if tcx.sess.opts.debugging_opts.incremental_info {
189+
println!("incremental: {} edges in serialized dep-graph", graph.edges.len());
190+
println!("incremental: {} hashes in serialized dep-graph", graph.hashes.len());
191+
}
192+
182193
debug!("graph = {:#?}", graph);
183194

184195
// Encode the directory and then the graph data.

0 commit comments

Comments
 (0)