Skip to content

Commit dc80b3e

Browse files
authored
Use proper logging for the treadmill (#1101)
This replaces the print statements with the `trace!` macro so that the logging can be enabled at run time and actually used for debugging.
1 parent d91b203 commit dc80b3e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util/treadmill.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ impl TreadMill {
3434

3535
pub fn add_to_treadmill(&self, object: ObjectReference, nursery: bool) {
3636
if nursery {
37-
// println!("+ an {}", cell);
37+
trace!("Adding {} to nursery", object);
3838
self.alloc_nursery.lock().unwrap().insert(object);
3939
} else {
40-
// println!("+ ts {}", cell);
40+
trace!("Adding {} to to_space", object);
4141
self.to_space.lock().unwrap().insert(object);
4242
}
4343
}
@@ -93,10 +93,10 @@ impl TreadMill {
9393

9494
pub fn flip(&mut self, full_heap: bool) {
9595
swap(&mut self.alloc_nursery, &mut self.collect_nursery);
96-
// println!("an <-> cn");
96+
trace!("Flipped alloc_nursery and collect_nursery");
9797
if full_heap {
9898
swap(&mut self.from_space, &mut self.to_space);
99-
// println!("fs <-> ts");
99+
trace!("Flipped from_space and to_space");
100100
}
101101
}
102102
}

0 commit comments

Comments
 (0)