add debug info to dep_graph
This commit is contained in:
parent
e4c31de61e
commit
eaafe45c08
2 changed files with 5 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ use super::DepGraphQuery;
|
|||
use super::DepNode;
|
||||
use super::edges::DepGraphEdges;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum DepMessage {
|
||||
Read(DepNode<DefId>),
|
||||
Write(DepNode<DefId>),
|
||||
|
|
@ -117,6 +118,8 @@ impl DepGraphThreadData {
|
|||
/// the buffer is full, this may swap.)
|
||||
#[inline]
|
||||
pub fn enqueue(&self, message: DepMessage) {
|
||||
debug!("enqueue: {:?} tasks_pushed={}", message, self.tasks_pushed.get());
|
||||
|
||||
// Regardless of whether dep graph construction is enabled, we
|
||||
// still want to check that we always have a valid task on the
|
||||
// stack when a read/write/etc event occurs.
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ pub fn visit_all_items_in_krate<'a, 'tcx, V, F>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
let _task = self.tcx.dep_graph.in_task(task_id);
|
||||
debug!("Started task {:?}", task_id);
|
||||
self.tcx.dep_graph.read(DepNode::Hir(item_def_id));
|
||||
self.visitor.visit_item(i)
|
||||
self.visitor.visit_item(i);
|
||||
debug!("Ended task {:?}", task_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue