diff options
Diffstat (limited to 'src/arch/power')
-rw-r--r-- | src/arch/power/pagetable.cc | 4 | ||||
-rw-r--r-- | src/arch/power/pagetable.hh | 5 | ||||
-rw-r--r-- | src/arch/power/tlb.cc | 10 | ||||
-rw-r--r-- | src/arch/power/tlb.hh | 9 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/arch/power/pagetable.cc b/src/arch/power/pagetable.cc index 091fb8bc8..4af0b7919 100644 --- a/src/arch/power/pagetable.cc +++ b/src/arch/power/pagetable.cc @@ -42,7 +42,7 @@ namespace PowerISA { void -PTE::serialize(std::ostream &os) +PTE::serialize(CheckpointOut &cp) const { SERIALIZE_SCALAR(Mask); SERIALIZE_SCALAR(VPN); @@ -61,7 +61,7 @@ PTE::serialize(std::ostream &os) } void -PTE::unserialize(Checkpoint *cp, const std::string §ion) +PTE::unserialize(CheckpointIn &cp) { UNSERIALIZE_SCALAR(Mask); UNSERIALIZE_SCALAR(VPN); diff --git a/src/arch/power/pagetable.hh b/src/arch/power/pagetable.hh index 3097aa526..d835a5316 100644 --- a/src/arch/power/pagetable.hh +++ b/src/arch/power/pagetable.hh @@ -146,9 +146,8 @@ struct PTE return (V0 | V1); }; - void serialize(std::ostream &os); - - void unserialize(Checkpoint *cp, const std::string §ion); + void serialize(CheckpointOut &cp) const; + void unserialize(CheckpointIn &cp); }; } // namespace PowerISA diff --git a/src/arch/power/tlb.cc b/src/arch/power/tlb.cc index 458ed29bf..edfb4f453 100644 --- a/src/arch/power/tlb.cc +++ b/src/arch/power/tlb.cc @@ -195,25 +195,25 @@ TLB::flushAll() } void -TLB::serialize(ostream &os) +TLB::serialize(CheckpointOut &cp) const { SERIALIZE_SCALAR(size); SERIALIZE_SCALAR(nlu); for (int i = 0; i < size; i++) { - nameOut(os, csprintf("%s.PTE%d", name(), i)); - table[i].serialize(os); + ScopedCheckpointSection sec(cp, csprintf("PTE%d", i)); + table[i].serialize(cp); } } void -TLB::unserialize(Checkpoint *cp, const string §ion) +TLB::unserialize(CheckpointIn &cp) { UNSERIALIZE_SCALAR(size); UNSERIALIZE_SCALAR(nlu); for (int i = 0; i < size; i++) { - table[i].unserialize(cp, csprintf("%s.PTE%d", section, i)); + ScopedCheckpointSection sec(cp, csprintf("PTE%d", i)); if (table[i].V0 || table[i].V1) { lookupTable.insert(make_pair(table[i].VPN, i)); } diff --git a/src/arch/power/tlb.hh b/src/arch/power/tlb.hh index 9818774d8..a07dad954 100644 --- a/src/arch/power/tlb.hh +++ b/src/arch/power/tlb.hh @@ -84,13 +84,13 @@ struct TlbEntry } void - serialize(std::ostream &os) + serialize(CheckpointOut &cp) const { SERIALIZE_SCALAR(_pageStart); } void - unserialize(Checkpoint *cp, const std::string §ion) + unserialize(CheckpointIn &cp) { UNSERIALIZE_SCALAR(_pageStart); } @@ -172,8 +172,9 @@ class TLB : public BaseTLB Fault finalizePhysical(RequestPtr req, ThreadContext *tc, Mode mode) const; // Checkpointing - void serialize(std::ostream &os); - void unserialize(Checkpoint *cp, const std::string §ion); + void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; + void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; + void regStats(); }; |