()
| 415 | self.next.load_image(bytes); |
| 416 | for set in &mut self.sets { |
| 417 | for line in &mut set.ways { |
| 418 | line.valid = false; |
| 419 | line.dirty = false; |
| 420 | line.tag = 0; |
| 421 | line.lru_age = 0; |
| 422 | } |
| 423 | } |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | impl<Next: MemoryAccess> Cache<Next> { |
| 428 | pub fn snapshot(&self) -> CacheSnapshot { |
| 429 | let sets = self |
| 430 | .sets |
| 431 | .iter() |
| 432 | .map(|s| { |
| 433 | s.ways |
| 434 | .iter() |
| 435 | .map(|w| CacheLineSnapshot { |
nothing calls this directly
no test coverage detected