MCPcopy Create free account
hub / github.com/cvut/qtrvsim / flush

Method flush

src/machine/memory/cache/cache.cpp:105–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void Cache::flush() {
106 if (!cache_config.enabled()) {
107 return;
108 }
109
110 for (size_t assoc_index = 0; assoc_index < cache_config.associativity();
111 assoc_index += 1) {
112 for (size_t set_index = 0; set_index < cache_config.set_count();
113 set_index += 1) {
114 if (dt[assoc_index][set_index].valid) {
115 kick(assoc_index, set_index);
116 emit cache_update(
117 assoc_index, set_index, 0, false, false, 0, nullptr, false);
118 }
119 }
120 }
121 change_counter++;
122 update_all_statistics();
123}
124
125void Cache::sync() {
126 flush();

Callers

nothing calls this directly

Calls 3

associativityMethod · 0.80
set_countMethod · 0.80
enabledMethod · 0.45

Tested by

no test coverage detected