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

Method ExtractNVMPage

test/test_graphs/example.cc:30–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30bool MigrationController::ExtractNVMPage(NVMPageStats& stats,
31 Profiler& profiler) {
32 if (nvm_heap_.empty()) {
33 for (unordered_map<uint64_t, NVMPage>::iterator it = nvm_pages_.begin();
34 it != nvm_pages_.end(); ++it) {
35 double dr = it->second.blocks.size() / page_blocks_;
36 double wr = it->second.epoch_writes / page_blocks_;
37 nvm_heap_.push_back({it->first, dr, wr});
38
39 total_nvm_writes_ += it->second.epoch_writes;
40 dirty_nvm_blocks_ += it->second.blocks.size();
41 }
42 make_heap(nvm_heap_.begin(), nvm_heap_.end());
43 }
44 profiler.AddTableOp();
45
46 if (nvm_heap_.empty()) return false;
47
48 stats = nvm_heap_.front();
49 pop_heap(nvm_heap_.begin(), nvm_heap_.end());
50 nvm_heap_.pop_back();
51 return true;
52}
53
54bool MigrationController::ExtractDRAMPage(DRAMPageStats& stats,
55 Profiler& profiler) {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected