Skip to content

Commit

Permalink
Rollup merge of rust-lang#47331 - michaelwoerister:measure-depgraph-l…
Browse files Browse the repository at this point in the history
…oading, 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!
  • Loading branch information
kennytm authored Jan 12, 2018
2 parents 7ffdabd + fe21c4c commit 30dbbb5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,11 @@ pub fn phase_2_configure_and_expand<F>(sess: &Session,
let dep_graph = match future_dep_graph {
None => DepGraph::new_disabled(),
Some(future) => {
let prev_graph = future
.open()
.expect("Could not join with background dep_graph thread")
.open(sess);
let prev_graph = time(time_passes, "blocked while dep-graph loading finishes", || {
future.open()
.expect("Could not join with background dep_graph thread")
.open(sess)
});
DepGraph::new(prev_graph)
}
};
Expand Down

0 comments on commit 30dbbb5

Please sign in to comment.