aboutsummaryrefslogtreecommitdiff
path: root/incria/src/deps.rs
diff options
context:
space:
mode:
Diffstat (limited to 'incria/src/deps.rs')
-rw-r--r--incria/src/deps.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/incria/src/deps.rs b/incria/src/deps.rs
index 924eb3f..f2fd8f8 100644
--- a/incria/src/deps.rs
+++ b/incria/src/deps.rs
@@ -18,6 +18,8 @@ use std::{
thread,
};
+use tracing::instrument;
+
/// Identifier of a node, unique across a program run.
pub type NodeId = u64;
@@ -40,6 +42,7 @@ struct DepTracker {
impl DepTracker {
/// See [`self::add_dep`]
+ #[instrument(level = "trace", skip(self))]
fn add_dep(&self, dep: NodeId) {
self.deps
.lock()
@@ -65,6 +68,7 @@ impl DepTracker {
}
/// See [`self::mark_dirty`]
+ #[instrument(level = "trace", skip(self))]
fn mark_dirty(&self, node: NodeId) {
let mut lock = self.deps.lock().unwrap();
let mut frontier = VecDeque::new();
@@ -87,6 +91,7 @@ impl DepTracker {
}
/// See [`self::is_dirty`]
+ #[instrument(level = "trace", skip(self))]
fn is_dirty(&self, node: NodeId) -> bool {
self.deps
.lock()
@@ -97,6 +102,7 @@ impl DepTracker {
}
/// See [`self::clear`]
+ #[instrument(level = "trace", skip(self))]
fn clear(&self, node: NodeId) {
let mut lock = self.deps.lock().unwrap();
let node = match lock.get_mut(&node) {