MCPcopy Index your code
hub / github.com/Persper/code-analytics / Clear

Method Clear

test/test_analytics/example.cc:81–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void MigrationController::Clear(Profiler& profiler) {
82 profiler.AddPageMoveInter(dirty_entries_); // epoch write-backs
83 for (PTTEntryIterator it = entries_.begin(); it != entries_.end(); ++it) {
84 it->second.epoch_reads = 0;
85 it->second.epoch_writes = 0;
86 if (it->second.state == PTTEntry::DIRTY_DIRECT) {
87 ShiftState(it->second, PTTEntry::CLEAN_DIRECT, Profiler::Overlap);
88 --dirty_entries_;
89 } else if (it->second.state == PTTEntry::DIRTY_STATIC) {
90 ShiftState(it->second, PTTEntry::CLEAN_STATIC, Profiler::Overlap);
91 --dirty_entries_;
92 }
93 }
94 profiler.AddTableOp();
95 assert(dirty_entries_ == 0);
96
97 nvm_pages_.clear();
98 dram_heap_.clear();
99 nvm_heap_.clear();
100}

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected