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

Method InputBlocks

test/test_graphs/example.cc:8–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace std;
7
8void MigrationController::InputBlocks(
9 const vector<ATTEntry>& blocks) {
10 assert(nvm_pages_.empty());
11 for (vector<ATTEntry>::const_iterator it = blocks.begin();
12 it != blocks.end(); ++it) {
13 if (it->state == ATTEntry::CLEAN || it->state == ATTEntry::FREE) {
14 assert(it->epoch_writes == 0);
15 continue;
16 }
17 uint64_t block_addr = it->phy_tag << block_bits_;
18 NVMPage& p = nvm_pages_[PageAlign(block_addr)];
19 p.epoch_reads += it->epoch_reads;
20 p.epoch_writes += it->epoch_writes;
21
22 if (it->epoch_writes) {
23 p.blocks.insert(block_addr);
24 assert(p.blocks.size() <= page_blocks_);
25 }
26 }
27 dirty_nvm_pages_ += nvm_pages_.size();
28}
29
30bool MigrationController::ExtractNVMPage(NVMPageStats& stats,
31 Profiler& profiler) {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected