Use 'relaxed' memory ordering for simple atomic counters in dep-graph.
This commit is contained in:
parent
a62c040929
commit
996511a456
1 changed files with 4 additions and 4 deletions
|
@ -497,8 +497,8 @@ impl DepGraph {
|
|||
let current_dep_graph = &self.data.as_ref().unwrap().current;
|
||||
|
||||
Some((
|
||||
current_dep_graph.total_read_count.load(SeqCst),
|
||||
current_dep_graph.total_duplicate_read_count.load(SeqCst),
|
||||
current_dep_graph.total_read_count.load(Relaxed),
|
||||
current_dep_graph.total_duplicate_read_count.load(Relaxed),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
|
@ -1111,7 +1111,7 @@ impl DepGraphData {
|
|||
if let Some(task_deps) = icx.task_deps {
|
||||
let mut task_deps = task_deps.lock();
|
||||
if cfg!(debug_assertions) {
|
||||
self.current.total_read_count.fetch_add(1, SeqCst);
|
||||
self.current.total_read_count.fetch_add(1, Relaxed);
|
||||
}
|
||||
if task_deps.read_set.insert(source) {
|
||||
task_deps.reads.push(source);
|
||||
|
@ -1129,7 +1129,7 @@ impl DepGraphData {
|
|||
}
|
||||
}
|
||||
} else if cfg!(debug_assertions) {
|
||||
self.current.total_duplicate_read_count.fetch_add(1, SeqCst);
|
||||
self.current.total_duplicate_read_count.fetch_add(1, Relaxed);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue