From e50dfe66f3c42bd67c0589b7bbd3307d5e9a1cf7 Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Tue, 5 Jun 2018 21:37:31 -0400 Subject: [PATCH] Fix more missed query data --- src/librustc/ty/query/plumbing.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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 @@ fn try_get_with>( 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 @@ pub(super) fn ensure_query>(self, key: Q::Key) -> () { // 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::(DUMMY_SP, key); + + self.sess.profiler(|p| p.end_activity(Q::CATEGORY)); } } -- 2.44.0