Skip to content

Commit e50dfe6

Browse files
committed
Fix more missed query data
1 parent d3aa593 commit e50dfe6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/librustc/ty/query/plumbing.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
369369
TryGetJob::NotYetStarted(job) => job,
370370
TryGetJob::JobCompleted(result) => {
371371
return result.map(|(v, index)| {
372+
self.sess.profiler(|p| p.record_query_hit(Q::CATEGORY));
372373
self.dep_graph.read_index(index);
373374
v
374375
})
@@ -592,7 +593,15 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
592593
// DepNodeIndex. We must invoke the query itself. The performance cost
593594
// this introduces should be negligible as we'll immediately hit the
594595
// in-memory cache, or another query down the line will.
596+
597+
self.sess.profiler(|p| {
598+
p.start_activity(Q::CATEGORY);
599+
p.record_query(Q::CATEGORY);
600+
});
601+
595602
let _ = self.get_query::<Q>(DUMMY_SP, key);
603+
604+
self.sess.profiler(|p| p.end_activity(Q::CATEGORY));
596605
}
597606
}
598607

0 commit comments

Comments
 (0)