+
+void
+FuncPageTable::serialize(std::ostream &os)
+{
+ paramOut(os, "ptable.size", pTable.size());
+
+ PTable::size_type count = 0;
+
+ PTableItr iter = pTable.begin();
+ PTableItr end = pTable.end();
+ while (iter != end) {
+ os << "\n[" << csprintf("%s.Entry%d", name(), count) << "]\n";
+
+ paramOut(os, "vaddr", iter->first);
+ iter->second.serialize(os);
+
+ ++iter;
+ ++count;
+ }
+ assert(count == pTable.size());
+}
+
+void
+FuncPageTable::unserialize(Checkpoint *cp, const std::string §ion)
+{
+ int i = 0, count;
+ paramIn(cp, section, "ptable.size", count);
+
+ pTable.clear();
+
+ while (i < count) {
+ TheISA::TlbEntry *entry;
+ Addr vaddr;
+
+ paramIn(cp, csprintf("%s.Entry%d", name(), i), "vaddr", vaddr);
+ entry = new TheISA::TlbEntry();
+ entry->unserialize(cp, csprintf("%s.Entry%d", name(), i));
+ pTable[vaddr] = *entry;
+ delete entry;
+ ++i;
+ }
+}
+