about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWesley Wiser <wwiser@gmail.com>2018-06-05 21:37:31 -0400
committerWesley Wiser <wwiser@gmail.com>2018-08-02 18:57:24 -0400
commite50dfe66f3c42bd67c0589b7bbd3307d5e9a1cf7 (patch)
treeee008c437c1807e351c94f493b767bd8d9f1a449 /src
parentd3aa593a6b339ae1475aa50e564e2774057faaa5 (diff)
downloadrust-e50dfe66f3c42bd67c0589b7bbd3307d5e9a1cf7.tar.gz
rust-e50dfe66f3c42bd67c0589b7bbd3307d5e9a1cf7.zip
Fix more missed query data
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/query/plumbing.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs
index 2b0cdccd51a..0fa643d796e 100644
--- a/src/librustc/ty/query/plumbing.rs
+++ b/src/librustc/ty/query/plumbing.rs
@@ -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
                 })
@@ -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));
         }
     }