Skip to content

Commit 30dbbb5

Browse files
authored
Rollup merge of rust-lang#47331 - michaelwoerister:measure-depgraph-loading, r=alexcrichton
Add -Ztime-passes line for dep-graph loading. We measure how much time the background thread spends on loading the dep-graph but not how long the main thread is blocked while the background thread is still working. Let's change that!
2 parents 7ffdabd + fe21c4c commit 30dbbb5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/librustc_driver/driver.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,11 @@ pub fn phase_2_configure_and_expand<F>(sess: &Session,
889889
let dep_graph = match future_dep_graph {
890890
None => DepGraph::new_disabled(),
891891
Some(future) => {
892-
let prev_graph = future
893-
.open()
894-
.expect("Could not join with background dep_graph thread")
895-
.open(sess);
892+
let prev_graph = time(time_passes, "blocked while dep-graph loading finishes", || {
893+
future.open()
894+
.expect("Could not join with background dep_graph thread")
895+
.open(sess)
896+
});
896897
DepGraph::new(prev_graph)
897898
}
898899
};

0 commit comments

Comments
 (0)