gem5
|
#include <iostream>
#include <list>
#include <map>
#include <stack>
#include <set>
#include <vector>
#include "base/bitunion.hh"
Go to the source code of this file.
Classes | |
class | Serializable |
Basic support for object serialization. More... | |
class | Serializable::ScopedCheckpointSection |
Scoped checkpoint section helper class. More... | |
class | CheckpointIn |
Macros | |
#define | SERIALIZE_SCALAR(scalar) paramOut(cp, #scalar, scalar) |
#define | UNSERIALIZE_SCALAR(scalar) paramIn(cp, #scalar, scalar) |
#define | UNSERIALIZE_OPT_SCALAR(scalar) optParamIn(cp, #scalar, scalar) |
#define | SERIALIZE_ENUM(scalar) paramOut(cp, #scalar, (int)scalar) |
#define | UNSERIALIZE_ENUM(scalar) |
#define | SERIALIZE_ARRAY(member, size) arrayParamOut(cp, #member, member, size) |
#define | UNSERIALIZE_ARRAY(member, size) arrayParamIn(cp, #member, member, size) |
#define | SERIALIZE_CONTAINER(member) arrayParamOut(cp, #member, member) |
#define | UNSERIALIZE_CONTAINER(member) arrayParamIn(cp, #member, member) |
#define | SERIALIZE_EVENT(event) event.serializeSection(cp, #event); |
#define | UNSERIALIZE_EVENT(event) |
#define | SERIALIZE_OBJ(obj) obj.serializeSection(cp, #obj) |
#define | UNSERIALIZE_OBJ(obj) obj.unserializeSection(cp, #obj) |
#define | SERIALIZE_OBJPTR(objptr) paramOut(cp, #objptr, (objptr)->name()) |
#define | UNSERIALIZE_OBJPTR(objptr) |
Typedefs | |
typedef std::ostream | CheckpointOut |
Functions | |
template<class T > | |
void | paramOut (CheckpointOut &cp, const std::string &name, const T ¶m) |
template<typename DataType , typename BitUnion > | |
void | paramOut (CheckpointOut &cp, const std::string &name, const BitfieldBackend::BitUnionOperators< DataType, BitUnion > &p) |
template<class T > | |
void | paramIn (CheckpointIn &cp, const std::string &name, T ¶m) |
template<typename DataType , typename BitUnion > | |
void | paramIn (CheckpointIn &cp, const std::string &name, BitfieldBackend::BitUnionOperators< DataType, BitUnion > &p) |
template<class T > | |
bool | optParamIn (CheckpointIn &cp, const std::string &name, T ¶m, bool warn=true) |
template<typename DataType , typename BitUnion > | |
bool | optParamIn (CheckpointIn &cp, const std::string &name, BitfieldBackend::BitUnionOperators< DataType, BitUnion > &p, bool warn=true) |
template<class T > | |
void | arrayParamOut (CheckpointOut &cp, const std::string &name, const T *param, unsigned size) |
template<class T > | |
void | arrayParamOut (CheckpointOut &cp, const std::string &name, const std::vector< T > ¶m) |
template<class T > | |
void | arrayParamOut (CheckpointOut &cp, const std::string &name, const std::list< T > ¶m) |
template<class T > | |
void | arrayParamOut (CheckpointOut &cp, const std::string &name, const std::set< T > ¶m) |
template<class T > | |
void | arrayParamIn (CheckpointIn &cp, const std::string &name, T *param, unsigned size) |
template<class T > | |
void | arrayParamIn (CheckpointIn &cp, const std::string &name, std::vector< T > ¶m) |
template<class T > | |
void | arrayParamIn (CheckpointIn &cp, const std::string &name, std::list< T > ¶m) |
template<class T > | |
void | arrayParamIn (CheckpointIn &cp, const std::string &name, std::set< T > ¶m) |
void | objParamIn (CheckpointIn &cp, const std::string &name, SimObject *¶m) |
void | debug_serialize (const std::string &cpt_dir) |
#define SERIALIZE_ARRAY | ( | member, | |
size | |||
) | arrayParamOut(cp, #member, member, size) |
Definition at line 158 of file serialize.hh.
Referenced by EtherTapBase::serialize(), TsunamiPChip::serialize(), AlphaBackdoor::Access::serialize(), X86ISA::Cmos::serialize(), Tsunami::serialize(), AlphaISA::ISA::serialize(), X86ISA::ISA::serialize(), CopyEngine::CopyEngineChannel::serialize(), X86ISA::I8259::serialize(), X86ISA::I82094AA::serialize(), AlphaISA::Interrupts::serialize(), Malta::serialize(), TsunamiCChip::serialize(), Iob::serialize(), SparcISA::ISA::serialize(), UFSHostDevice::serialize(), Pl390::BankedRegs::serialize(), VGic::serialize(), PciDevice::serialize(), SparcISA::Interrupts::serialize(), ArmISA::Interrupts::serialize(), X86ISA::Interrupts::serialize(), ArmISA::ISA::serialize(), IdeDisk::serialize(), NSGigE::serialize(), Pl390::serialize(), Pl111::serialize(), IGbE::TxDescCache::serialize(), serialize(), and IGbE::serialize().
#define SERIALIZE_CONTAINER | ( | member | ) | arrayParamOut(cp, #member, member) |
Definition at line 164 of file serialize.hh.
Referenced by NoMaliGpu::serialize(), FlashDevice::serialize(), Pl050::serialize(), DVFSHandler::serialize(), SparcISA::TLB::serialize(), PhysicalMemory::serialize(), FrameBuffer::serialize(), DmaReadFifo::serialize(), Pl111::serialize(), and Globals::serialize().
#define SERIALIZE_ENUM | ( | scalar | ) | paramOut(cp, #scalar, (int)scalar) |
Definition at line 149 of file serialize.hh.
Referenced by ThreadState::serialize(), X86ISA::I8259::serialize(), I2CBus::serialize(), ArmISA::TlbEntry::serialize(), and IdeDisk::serialize().
#define SERIALIZE_EVENT | ( | event | ) | event.serializeSection(cp, #event); |
Definition at line 170 of file serialize.hh.
#define SERIALIZE_OBJ | ( | obj | ) | obj.serializeSection(cp, #obj) |
Definition at line 178 of file serialize.hh.
Referenced by HDLcd::serialize(), and BasePixelPump::serialize().
Definition at line 181 of file serialize.hh.
Referenced by SparcISA::ISA::serialize().
#define SERIALIZE_SCALAR | ( | scalar | ) | paramOut(cp, #scalar, scalar) |
Definition at line 143 of file serialize.hh.
Referenced by ArmISA::EndBitUnion(), X86ISA::I8237::serialize(), PollEvent::serialize(), Pl011::serialize(), FDEntry::serialize(), ThreadState::serialize(), DisplayTimings::serialize(), DumbTOD::serialize(), ThermalResistor::serialize(), FlashDevice::serialize(), EtherTapBase::serialize(), Sinic::Base::serialize(), TsunamiPChip::serialize(), X86ISA::Speaker::serialize(), MipsISA::PTE::serialize(), RiscvISA::PTE::serialize(), Kernel::Statistics::serialize(), AlphaBackdoor::Access::serialize(), X86ISA::Cmos::serialize(), PowerISA::TlbEntry::serialize(), AlphaISA::Kernel::Statistics::serialize(), EtherSwitch::Interface::serialize(), AlphaISA::ISA::serialize(), LocalSimLoopExitEvent::serialize(), SystemCounter::serialize(), ThermalCapacitor::serialize(), DistEtherLink::Link::serialize(), ArmISA::PMU::serialize(), ThermalDomain::serialize(), RubySystem::serialize(), HDLcd::serialize(), MipsISA::TlbEntry::serialize(), RiscvISA::TlbEntry::serialize(), CopyEngineReg::Reg< uint64_t >::serialize(), GenericISA::PCStateBase::serialize(), RiscvISA::TLB::serialize(), MipsISA::TLB::serialize(), CopyEngine::CopyEngineChannel::serialize(), X86ISA::I8259::serialize(), X86ISA::I82094AA::serialize(), GpuDispatcher::serialize(), Root::serialize(), Uart8250::serialize(), EtherSwitch::Interface::PortFifoEntry::serialize(), AlphaISA::TLB::serialize(), AlphaISA::Interrupts::serialize(), Sp804::Timer::serialize(), CopyEngineReg::Regs::serialize(), PL031::serialize(), FileFDEntry::serialize(), VoltageDomain::serialize(), ThermalReference::serialize(), MaltaIO::serialize(), TsunamiCChip::serialize(), EnergyCtrl::serialize(), CowDiskImage::serialize(), TsunamiIO::serialize(), Iob::serialize(), AlphaISA::TlbEntry::serialize(), X86ISA::TLB::serialize(), CpuLocalTimer::Timer::serialize(), PowerISA::PTE::serialize(), I2CBus::serialize(), BasePixelPump::serialize(), IdeController::serialize(), Pl050::serialize(), EtherTapStub::serialize(), ThermalModel::serialize(), EtherSwitch::Interface::PortFifo::serialize(), SparcISA::ISA::serialize(), PipeFDEntry::serialize(), MC146818::serialize(), PowerISA::TLB::serialize(), DVFSHandler::serialize(), UFSHostDevice::serialize(), SparcISA::TLB::serialize(), Pl390::BankedRegs::serialize(), RealViewCtrl::serialize(), ArchTimer::serialize(), VGic::serialize(), CopyEngineReg::ChanRegs::serialize(), DeviceFDEntry::serialize(), RealViewOsc::serialize(), PciDevice::serialize(), VirtIO9PProxy::serialize(), DistIface::SyncNode::serialize(), TrafficGen::serialize(), SrcClockDomain::serialize(), ClockedObject::serialize(), SparcISA::Interrupts::serialize(), PhysicalMemory::serialize(), X86ISA::I8042::serialize(), GenericISA::UPCState< MachInst >::serialize(), FrameBuffer::serialize(), BasePixelPump::PixelEvent::serialize(), ArmISA::Interrupts::serialize(), SparcISA::TlbEntry::serialize(), DistIface::SyncSwitch::serialize(), ArmISA::TlbEntry::serialize(), X86ISA::Interrupts::serialize(), Sinic::Device::serialize(), iGbReg::Regs::Reg< uint64_t >::serialize(), VirtQueue::serialize(), DmaReadFifo::serialize(), ArmISA::PMU::CounterState::serialize(), IGbE::DescCache< T >::serialize(), X86ISA::PCState::serialize(), GenericISA::DelaySlotPCState< MachInst >::serialize(), ArmISA::TLB::serialize(), DistIface::RecvScheduler::Desc::serialize(), ArmISA::ISA::serialize(), IdeDisk::serialize(), NSGigE::serialize(), Pl390::serialize(), Pl111::serialize(), HDLcd::DmaEngine::serialize(), IGbE::RxDescCache::serialize(), Event::serialize(), GenericISA::DelaySlotUPCState< MachInst >::serialize(), DistIface::RecvScheduler::serialize(), IGbE::TxDescCache::serialize(), System::serialize(), IGbE::serialize(), Cache::serialize(), VirtIODeviceBase::serialize(), DistIface::serialize(), iGbReg::Regs::serialize(), and PhysicalMemory::serializeStore().
#define UNSERIALIZE_ARRAY | ( | member, | |
size | |||
) | arrayParamIn(cp, #member, member, size) |
Definition at line 161 of file serialize.hh.
Referenced by EtherTapBase::unserialize(), TsunamiPChip::unserialize(), AlphaBackdoor::Access::unserialize(), X86ISA::Cmos::unserialize(), Tsunami::unserialize(), AlphaISA::ISA::unserialize(), X86ISA::ISA::unserialize(), CopyEngine::CopyEngineChannel::unserialize(), X86ISA::I8259::unserialize(), X86ISA::I82094AA::unserialize(), AlphaISA::Interrupts::unserialize(), Malta::unserialize(), TsunamiCChip::unserialize(), Iob::unserialize(), SparcISA::ISA::unserialize(), UFSHostDevice::unserialize(), Pl390::BankedRegs::unserialize(), VGic::unserialize(), PciDevice::unserialize(), SparcISA::Interrupts::unserialize(), ArmISA::Interrupts::unserialize(), X86ISA::Interrupts::unserialize(), IdeDisk::unserialize(), NSGigE::unserialize(), Pl390::unserialize(), ArmISA::ISA::unserialize(), Pl111::unserialize(), IGbE::TxDescCache::unserialize(), unserialize(), and IGbE::unserialize().
#define UNSERIALIZE_CONTAINER | ( | member | ) | arrayParamIn(cp, #member, member) |
Definition at line 167 of file serialize.hh.
Referenced by NoMaliGpu::unserialize(), FlashDevice::unserialize(), Pl050::unserialize(), DVFSHandler::unserialize(), SparcISA::TLB::unserialize(), FrameBuffer::unserialize(), PhysicalMemory::unserialize(), DmaReadFifo::unserialize(), and Pl111::unserialize().
#define UNSERIALIZE_ENUM | ( | scalar | ) |
Definition at line 151 of file serialize.hh.
Referenced by ThreadState::unserialize(), X86ISA::I8259::unserialize(), I2CBus::unserialize(), ArmISA::TlbEntry::unserialize(), and IdeDisk::unserialize().
#define UNSERIALIZE_EVENT | ( | event | ) |
Definition at line 172 of file serialize.hh.
#define UNSERIALIZE_OBJ | ( | obj | ) | obj.unserializeSection(cp, #obj) |
Definition at line 179 of file serialize.hh.
Referenced by BasePixelPump::unserialize().
#define UNSERIALIZE_OBJPTR | ( | objptr | ) |
Definition at line 183 of file serialize.hh.
Referenced by SparcISA::ISA::unserialize().
#define UNSERIALIZE_OPT_SCALAR | ( | scalar | ) | optParamIn(cp, #scalar, scalar) |
Definition at line 146 of file serialize.hh.
Referenced by SystemCounter::unserialize(), RubySystem::unserialize(), ArchTimer::unserialize(), GenericTimer::unserialize(), and Pl390::unserialize().
#define UNSERIALIZE_SCALAR | ( | scalar | ) | paramIn(cp, #scalar, scalar) |
Definition at line 145 of file serialize.hh.
Referenced by ArmISA::EndBitUnion(), X86ISA::I8237::unserialize(), PollEvent::unserialize(), Pl011::unserialize(), FDEntry::unserialize(), DisplayTimings::unserialize(), DumbTOD::unserialize(), ThreadState::unserialize(), ThermalResistor::unserialize(), FlashDevice::unserialize(), EtherTapBase::unserialize(), Sinic::Base::unserialize(), TsunamiPChip::unserialize(), X86ISA::Speaker::unserialize(), RiscvISA::PTE::unserialize(), MipsISA::PTE::unserialize(), Kernel::Statistics::unserialize(), AlphaBackdoor::Access::unserialize(), X86ISA::Cmos::unserialize(), AlphaISA::Kernel::Statistics::unserialize(), EtherSwitch::Interface::unserialize(), PowerISA::TlbEntry::unserialize(), AlphaISA::ISA::unserialize(), LocalSimLoopExitEvent::unserialize(), SystemCounter::unserialize(), ThermalCapacitor::unserialize(), DistEtherLink::Link::unserialize(), ArmISA::PMU::unserialize(), ThermalDomain::unserialize(), RubySystem::unserialize(), HDLcd::unserialize(), CopyEngineReg::Reg< uint64_t >::unserialize(), MipsISA::TlbEntry::unserialize(), RiscvISA::TlbEntry::unserialize(), RiscvISA::TLB::unserialize(), MipsISA::TLB::unserialize(), CopyEngine::CopyEngineChannel::unserialize(), X86ISA::I8259::unserialize(), X86ISA::I82094AA::unserialize(), GpuDispatcher::unserialize(), GenericISA::PCStateBase::unserialize(), Uart8250::unserialize(), EtherSwitch::Interface::PortFifoEntry::unserialize(), AlphaISA::TLB::unserialize(), Sp804::Timer::unserialize(), PL031::unserialize(), FileFDEntry::unserialize(), AlphaISA::Interrupts::unserialize(), VoltageDomain::unserialize(), ThermalReference::unserialize(), MaltaIO::unserialize(), TsunamiCChip::unserialize(), CopyEngineReg::Regs::unserialize(), EnergyCtrl::unserialize(), CowDiskImage::unserialize(), TsunamiIO::unserialize(), Iob::unserialize(), AlphaISA::TlbEntry::unserialize(), X86ISA::TLB::unserialize(), CpuLocalTimer::Timer::unserialize(), PowerISA::PTE::unserialize(), I2CBus::unserialize(), BasePixelPump::unserialize(), IdeController::unserialize(), Pl050::unserialize(), ThermalModel::unserialize(), EtherTapStub::unserialize(), EtherSwitch::Interface::PortFifo::unserialize(), SparcISA::ISA::unserialize(), PipeFDEntry::unserialize(), PowerISA::TLB::unserialize(), DVFSHandler::unserialize(), UFSHostDevice::unserialize(), SparcISA::TLB::unserialize(), Pl390::BankedRegs::unserialize(), MC146818::unserialize(), RealViewCtrl::unserialize(), ArchTimer::unserialize(), VGic::unserialize(), DeviceFDEntry::unserialize(), CopyEngineReg::ChanRegs::unserialize(), RealViewOsc::unserialize(), VirtIO9PProxy::unserialize(), PciDevice::unserialize(), DistIface::SyncNode::unserialize(), TrafficGen::unserialize(), SrcClockDomain::unserialize(), ClockedObject::unserialize(), X86ISA::I8042::unserialize(), SparcISA::Interrupts::unserialize(), FrameBuffer::unserialize(), PhysicalMemory::unserialize(), GenericISA::UPCState< MachInst >::unserialize(), BasePixelPump::PixelEvent::unserialize(), ArmISA::Interrupts::unserialize(), SparcISA::TlbEntry::unserialize(), DistIface::SyncSwitch::unserialize(), GenericTimerMem::unserialize(), X86ISA::Interrupts::unserialize(), Sinic::Device::unserialize(), iGbReg::Regs::Reg< uint64_t >::unserialize(), ArmISA::TlbEntry::unserialize(), VirtQueue::unserialize(), DmaReadFifo::unserialize(), IGbE::DescCache< T >::unserialize(), ArmISA::PMU::CounterState::unserialize(), X86ISA::PCState::unserialize(), GenericISA::DelaySlotPCState< MachInst >::unserialize(), ArmISA::TLB::unserialize(), DistIface::RecvScheduler::Desc::unserialize(), IdeDisk::unserialize(), NSGigE::unserialize(), Pl390::unserialize(), ArmISA::ISA::unserialize(), Pl111::unserialize(), HDLcd::DmaEngine::unserialize(), IGbE::RxDescCache::unserialize(), Event::unserialize(), GenericISA::DelaySlotUPCState< MachInst >::unserialize(), DistIface::RecvScheduler::unserialize(), IGbE::TxDescCache::unserialize(), System::unserialize(), IGbE::unserialize(), Cache::unserialize(), VirtIODeviceBase::unserialize(), DistIface::unserialize(), iGbReg::Regs::unserialize(), and PhysicalMemory::unserializeStore().
typedef std::ostream CheckpointOut |
Definition at line 67 of file serialize.hh.
void arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T * | param, | ||
unsigned | size | ||
) |
void arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
std::vector< T > & | param | ||
) |
void arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
std::list< T > & | param | ||
) |
void arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
std::set< T > & | param | ||
) |
void arrayParamOut | ( | CheckpointOut & | cp, |
const std::string & | name, | ||
const T * | param, | ||
unsigned | size | ||
) |
void arrayParamOut | ( | CheckpointOut & | cp, |
const std::string & | name, | ||
const std::vector< T > & | param | ||
) |
void arrayParamOut | ( | CheckpointOut & | cp, |
const std::string & | name, | ||
const std::list< T > & | param | ||
) |
void arrayParamOut | ( | CheckpointOut & | cp, |
const std::string & | name, | ||
const std::set< T > & | param | ||
) |
void debug_serialize | ( | const std::string & | cpt_dir | ) |
void objParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
SimObject *& | param | ||
) |
bool optParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T & | param, | ||
bool | warn = true |
||
) |
Referenced by optParamIn().
bool optParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
BitfieldBackend::BitUnionOperators< DataType, BitUnion > & | p, | ||
bool | warn = true |
||
) |
Definition at line 97 of file serialize.hh.
References optParamIn(), and warn.
void paramIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T & | param | ||
) |
Referenced by paramIn().
void paramIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
BitfieldBackend::BitUnionOperators< DataType, BitUnion > & | p | ||
) |
Definition at line 86 of file serialize.hh.
References paramIn().
void paramOut | ( | CheckpointOut & | cp, |
const std::string & | name, | ||
const T & | param | ||
) |
Referenced by paramOut().
void paramOut | ( | CheckpointOut & | cp, |
const std::string & | name, | ||
const BitfieldBackend::BitUnionOperators< DataType, BitUnion > & | p | ||
) |
Definition at line 76 of file serialize.hh.
References paramOut().