Skip to content

Commit

Permalink
Fix more missed query data
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Aug 2, 2018
1 parent d3aa593 commit e50dfe6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/librustc/ty/query/plumbing.rs
Expand Up @@ -369,6 +369,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
TryGetJob::NotYetStarted(job) => job,
TryGetJob::JobCompleted(result) => {
return result.map(|(v, index)| {
self.sess.profiler(|p| p.record_query_hit(Q::CATEGORY));
self.dep_graph.read_index(index);
v
})
Expand Down Expand Up @@ -592,7 +593,15 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
// DepNodeIndex. We must invoke the query itself. The performance cost
// this introduces should be negligible as we'll immediately hit the
// in-memory cache, or another query down the line will.

self.sess.profiler(|p| {
p.start_activity(Q::CATEGORY);
p.record_query(Q::CATEGORY);
});

let _ = self.get_query::<Q>(DUMMY_SP, key);

self.sess.profiler(|p| p.end_activity(Q::CATEGORY));
}
}

Expand Down

0 comments on commit e50dfe6

Please sign in to comment.