gem5 v24.0.0.0
|
Classes | |
struct | gem5::ParseParam< T, Enable > |
Macros | |
#define | SERIALIZE_EVENT(event) event.serializeSection(cp, #event); |
#define | UNSERIALIZE_EVENT(event) |
#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) ::gem5::arrayParamOut(cp, #member, member, size) |
#define | UNSERIALIZE_ARRAY(member, size) ::gem5::arrayParamIn(cp, #member, member, size) |
#define | SERIALIZE_CONTAINER(member) ::gem5::arrayParamOut(cp, #member, member) |
#define | UNSERIALIZE_CONTAINER(member) ::gem5::arrayParamIn(cp, #member, member) |
#define | SERIALIZE_OBJ(obj) obj.serializeSection(cp, #obj) |
This macro serializes an object into its own section. | |
#define | UNSERIALIZE_OBJ(obj) obj.unserializeSection(cp, #obj) |
Functions | |
static std::string | gem5::CheckpointIn::setDir (const std::string &base_name) |
Set the current directory. | |
static std::string | gem5::CheckpointIn::dir () |
Get the current checkout directory name. | |
gem5::Serializable::Serializable () | |
virtual void | gem5::Serializable::serialize (CheckpointOut &cp) const =0 |
Serialize an object. | |
virtual void | gem5::Serializable::unserialize (CheckpointIn &cp)=0 |
Unserialize an object. | |
void | gem5::Serializable::serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | gem5::Serializable::serializeSection (CheckpointOut &cp, const std::string &name) const |
void | gem5::Serializable::unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | gem5::Serializable::unserializeSection (CheckpointIn &cp, const std::string &name) |
static const std::string & | gem5::Serializable::currentSection () |
Gets the fully-qualified name of the active section. | |
static void | gem5::Serializable::generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
template<class T > | |
void | gem5::paramOut (CheckpointOut &os, const std::string &name, const T ¶m) |
This function is used for writing parameters to a checkpoint. | |
template<class T > | |
bool | gem5::optParamIn (CheckpointIn &cp, const std::string &name, T ¶m, bool do_warn=true) |
This function is used for restoring optional parameters from the checkpoint. | |
template<class T > | |
void | gem5::paramIn (CheckpointIn &cp, const std::string &name, T ¶m) |
This function is used for restoring parameters from a checkpoint. | |
template<class InputIterator > | |
void | gem5::arrayParamOut (CheckpointOut &os, const std::string &name, InputIterator start, InputIterator end) |
template<class T > | |
decltype(std::begin(std::declval< const T & >()), std::end(std::declval< const T & >()), void()) | gem5::arrayParamOut (CheckpointOut &os, const std::string &name, const T ¶m) |
template<class T > | |
void | gem5::arrayParamOut (CheckpointOut &os, const std::string &name, const T *param, unsigned size) |
template<class T , class InsertIterator > | |
void | gem5::arrayParamIn (CheckpointIn &cp, const std::string &name, InsertIterator inserter, ssize_t fixed_size=-1) |
Extract values stored in the checkpoint, and assign them to the provided array container. | |
template<class T > | |
decltype(std::declval< T >().insert(std::declval< typename T::value_type >()), void()) | gem5::arrayParamIn (CheckpointIn &cp, const std::string &name, T ¶m) |
template<class T > | |
void | gem5::arrayParamIn (CheckpointIn &cp, const std::string &name, T *param, unsigned size) |
virtual void | gem5::SimObject::loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | gem5::SimObject::initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual SimObject * | gem5::SimObjectResolver::resolveSimObject (const std::string &name)=0 |
Find a SimObject given a full path name. | |
void | gem5::objParamIn (CheckpointIn &cp, const std::string &name, SimObject *¶m) |
To avoid circular dependencies the unserialization of SimObjects must be implemented here. | |
const std::string | gem5::CheckpointIn::getCptDir () |
bool | gem5::CheckpointIn::find (const std::string §ion, const std::string &entry, std::string &value) |
bool | gem5::CheckpointIn::entryExists (const std::string §ion, const std::string &entry) |
bool | gem5::CheckpointIn::sectionExists (const std::string §ion) |
void | gem5::CheckpointIn::visitSection (const std::string §ion, IniFile::VisitSectionCallback cb) |
template<class CP > | |
gem5::Serializable::ScopedCheckpointSection::ScopedCheckpointSection (CP &cp, const char *name) | |
This is the constructor for Scoped checkpoint section helper class. | |
template<class CP > | |
gem5::Serializable::ScopedCheckpointSection::ScopedCheckpointSection (CP &cp, const std::string &name) | |
These methods related to the "Serialize" interface.
#define SERIALIZE_ARRAY | ( | member, | |
size ) ::gem5::arrayParamOut(cp, #member, member, size) |
Definition at line 610 of file serialize.hh.
Referenced by gem5::AMDGPUDevice::serialize(), gem5::AMDGPUVM::serialize(), gem5::ArmISA::Interrupts::serialize(), gem5::CopyEngine::CopyEngineChannel::serialize(), gem5::EtherTapBase::serialize(), gem5::GicV2::BankedRegs::serialize(), gem5::GicV2::serialize(), gem5::IdeDisk::serialize(), gem5::IGbE::serialize(), gem5::IGbE::TxDescCache::serialize(), gem5::Iob::serialize(), gem5::Iris::Interrupts::serialize(), gem5::Iris::ISA::serialize(), gem5::Malta::serialize(), gem5::NSGigE::serialize(), gem5::PciDevice::serialize(), gem5::Pl111::serialize(), gem5::PM4PacketProcessor::serialize(), gem5::SDMAEngine::serialize(), gem5::SMMUv3::serialize(), gem5::SparcISA::Interrupts::serialize(), gem5::SparcISA::ISA::serialize(), gem5::UFSHostDevice::serialize(), gem5::VGic::serialize(), gem5::X86ISA::Cmos::serialize(), gem5::X86ISA::I82094AA::serialize(), gem5::X86ISA::I8259::serialize(), gem5::X86ISA::Interrupts::serialize(), gem5::X86ISA::ISA::serialize(), and TEST_F().
#define SERIALIZE_CONTAINER | ( | member | ) | ::gem5::arrayParamOut(cp, #member, member) |
Definition at line 626 of file serialize.hh.
Referenced by gem5::DmaReadFifo::serialize(), gem5::DVFSHandler::serialize(), gem5::FlashDevice::serialize(), gem5::FrameBuffer::serialize(), gem5::Gicv3Distributor::serialize(), gem5::Gicv3Its::serialize(), gem5::Gicv3Redistributor::serialize(), gem5::Globals::serialize(), gem5::memory::CfiMemory::BlockData::serialize(), gem5::memory::CfiMemory::ProgramBuffer::serialize(), gem5::memory::PhysicalMemory::serialize(), gem5::NoMaliGpu::serialize(), gem5::Pl111::serialize(), gem5::Plic::serialize(), gem5::ps2::Device::serialize(), gem5::RiscvISA::ISA::serialize(), gem5::SparcISA::TLB::serialize(), gem5::SystemCounter::serialize(), and TEST_F().
#define SERIALIZE_ENUM | ( | scalar | ) | paramOut(cp, #scalar, (int)scalar) |
Definition at line 591 of file serialize.hh.
Referenced by gem5::ArmISA::TlbEntry::serialize(), gem5::Gicv3CPUInterface::serialize(), gem5::I2CBus::serialize(), gem5::IdeDisk::serialize(), gem5::memory::CfiMemory::serialize(), gem5::ThreadState::serialize(), gem5::X86ISA::I8259::serialize(), and TEST_F().
#define SERIALIZE_EVENT | ( | event | ) | event.serializeSection(cp, #event); |
#define SERIALIZE_OBJ | ( | obj | ) | obj.serializeSection(cp, #obj) |
This macro serializes an object into its own section.
The object must inherit from Serializable, but NOT from SimObject (i.e, it is an object in the strict sense of "object oriented programing"). Objects that derive from SimObject are automatically serialized elsewhere (
Definition at line 648 of file serialize.hh.
Referenced by gem5::BasePixelPump::serialize(), gem5::HDLcd::serialize(), and gem5::memory::CfiMemory::serialize().
#define UNSERIALIZE_ARRAY | ( | member, | |
size ) ::gem5::arrayParamIn(cp, #member, member, size) |
Definition at line 618 of file serialize.hh.
Referenced by TEST_F(), gem5::AMDGPUDevice::unserialize(), gem5::AMDGPUVM::unserialize(), gem5::ArmISA::Interrupts::unserialize(), gem5::CopyEngine::CopyEngineChannel::unserialize(), gem5::EtherTapBase::unserialize(), gem5::GicV2::BankedRegs::unserialize(), gem5::GicV2::unserialize(), gem5::IdeDisk::unserialize(), gem5::IGbE::TxDescCache::unserialize(), gem5::IGbE::unserialize(), gem5::Iob::unserialize(), gem5::Malta::unserialize(), gem5::NSGigE::unserialize(), gem5::PciDevice::unserialize(), gem5::Pl111::unserialize(), gem5::PM4PacketProcessor::unserialize(), gem5::SDMAEngine::unserialize(), gem5::SMMUv3::unserialize(), gem5::SparcISA::Interrupts::unserialize(), gem5::SparcISA::ISA::unserialize(), gem5::UFSHostDevice::unserialize(), gem5::VGic::unserialize(), gem5::X86ISA::Cmos::unserialize(), gem5::X86ISA::I82094AA::unserialize(), gem5::X86ISA::I8259::unserialize(), gem5::X86ISA::Interrupts::unserialize(), and gem5::X86ISA::ISA::unserialize().
#define UNSERIALIZE_CONTAINER | ( | member | ) | ::gem5::arrayParamIn(cp, #member, member) |
Definition at line 634 of file serialize.hh.
Referenced by TEST_F(), gem5::DmaReadFifo::unserialize(), gem5::DVFSHandler::unserialize(), gem5::FlashDevice::unserialize(), gem5::FrameBuffer::unserialize(), gem5::Gicv3Distributor::unserialize(), gem5::Gicv3Its::unserialize(), gem5::Gicv3Redistributor::unserialize(), gem5::memory::CfiMemory::BlockData::unserialize(), gem5::memory::CfiMemory::ProgramBuffer::unserialize(), gem5::memory::PhysicalMemory::unserialize(), gem5::NoMaliGpu::unserialize(), gem5::Pl111::unserialize(), gem5::Plic::unserialize(), gem5::ps2::Device::unserialize(), gem5::RiscvISA::ISA::unserialize(), gem5::SparcISA::TLB::unserialize(), and gem5::SystemCounter::unserialize().
#define UNSERIALIZE_ENUM | ( | scalar | ) |
Definition at line 598 of file serialize.hh.
Referenced by TEST_F(), gem5::ArmISA::TlbEntry::unserialize(), gem5::Gicv3CPUInterface::unserialize(), gem5::I2CBus::unserialize(), gem5::IdeDisk::unserialize(), gem5::memory::CfiMemory::unserialize(), gem5::ThreadState::unserialize(), and gem5::X86ISA::I8259::unserialize().
#define UNSERIALIZE_EVENT | ( | event | ) |
#define UNSERIALIZE_OBJ | ( | obj | ) | obj.unserializeSection(cp, #obj) |
Definition at line 655 of file serialize.hh.
Referenced by gem5::BasePixelPump::unserialize(), and gem5::memory::CfiMemory::unserialize().
#define UNSERIALIZE_OPT_SCALAR | ( | scalar | ) | optParamIn(cp, #scalar, scalar) |
Definition at line 582 of file serialize.hh.
Referenced by TEST_F(), gem5::ArchTimer::unserialize(), gem5::ArmISA::PMU::unserialize(), gem5::GenericTimer::unserialize(), gem5::GicV2::unserialize(), and gem5::ruby::RubySystem::unserialize().
void gem5::arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
InsertIterator | inserter, | ||
ssize_t | fixed_size = -1 ) |
Extract values stored in the checkpoint, and assign them to the provided array container.
cp | The checkpoint to be parsed. |
name | Name of the container. |
param | The array container. |
size | The expected number of entries to be extracted. |
Definition at line 441 of file serialize.hh.
References gem5::Serializable::currentSection(), fatal_if, gem5::CheckpointIn::find(), name(), gem5::scmi::token, and gem5::tokenize().
decltype(std::declval< T >().insert(std::declval< typename T::value_type >()), void()) gem5::arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T & | param ) |
Definition at line 470 of file serialize.hh.
References gem5::arrayParamIn(), and name().
void gem5::arrayParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T * | param, | ||
unsigned | size ) |
Definition at line 494 of file serialize.hh.
References gem5::arrayParamIn(), data, and name().
decltype(std::begin(std::declval< const T & >()), std::end(std::declval< const T & >()), void()) gem5::arrayParamOut | ( | CheckpointOut & | os, |
const std::string & | name, | ||
const T & | param ) |
Definition at line 409 of file serialize.hh.
References gem5::arrayParamOut(), name(), and gem5::X86ISA::os.
void gem5::arrayParamOut | ( | CheckpointOut & | os, |
const std::string & | name, | ||
const T * | param, | ||
unsigned | size ) |
Definition at line 421 of file serialize.hh.
References gem5::arrayParamOut(), name(), and gem5::X86ISA::os.
void gem5::arrayParamOut | ( | CheckpointOut & | os, |
const std::string & | name, | ||
InputIterator | start, | ||
InputIterator | end ) |
Definition at line 388 of file serialize.hh.
References name(), gem5::X86ISA::os, and gem5::ShowParam< T, Enabled >::show().
|
static |
Gets the fully-qualified name of the active section.
Definition at line 130 of file serialize.cc.
References gem5::Serializable::path.
Referenced by gem5::arrayParamIn(), gem5::BaseSemihosting::FileBase::create(), gem5::mappingParamIn(), gem5::Serializable::ScopedCheckpointSection::nameOut(), gem5::objParamIn(), gem5::optParamIn(), gem5::paramIn(), gem5::paramInImpl(), TEST_F(), TEST_F(), TEST_F(), gem5::GicV2::unserialize(), gem5::Globals::unserialize(), and gem5::HDLcd::unserialize().
|
static |
Get the current checkout directory name.
This function exports the current checkout point directory name so other objects can derive filenames from it (e.g., memory). The return value is guaranteed to end in '/' so filenames can be directly appended. This function is only valid while a checkpoint is being created.
Definition at line 157 of file serialize.cc.
Referenced by gem5::CowDiskImage::serialize(), gem5::memory::DRAMSys::serialize(), gem5::memory::PhysicalMemory::serializeStore(), TEST(), TEST(), TEST_F(), gem5::memory::DRAMSys::unserialize(), and gem5::ruby::RubySystem::writeCompressedTrace().
bool gem5::CheckpointIn::entryExists | ( | const std::string & | section, |
const std::string & | entry ) |
section | Here we mention the section we are looking for (example: currentsection). |
entry | Mention the entry we are looking for (example: interrupt time) in the section. |
Definition at line 181 of file serialize.cc.
References gem5::CheckpointIn::db, and gem5::IniFile::entryExists().
Referenced by gem5::GicV2::unserialize().
bool gem5::CheckpointIn::find | ( | const std::string & | section, |
const std::string & | entry, | ||
std::string & | value ) |
section | Here we mention the section we are looking for (example: currentsection). |
entry | Mention the entry we are looking for (example: Cache line size etc) in the section. |
value | Give the value at the said entry. |
Definition at line 196 of file serialize.cc.
References gem5::CheckpointIn::db, and gem5::IniFile::find().
Referenced by gem5::arrayParamIn(), gem5::objParamIn(), gem5::paramInImpl(), and gem5::Globals::unserialize().
|
static |
Generate a checkpoint file so that the serialization can be routed to it.
cpt_dir | The dir at which the cpt file will be created. |
outstream | The cpt file. |
Definition at line 88 of file serialize.cc.
References gem5::CheckpointIn::baseFilename, fatal, gem5::CheckpointIn::setDir(), and gem5::ArmISA::t.
Referenced by gem5::SimObject::serializeAll(), TEST(), TEST_F(), and TEST_F().
|
inline |
Definition at line 85 of file serialize.hh.
References gem5::CheckpointIn::_cptDir.
Referenced by gem5::CheckpointIn::CheckpointIn(), gem5::CowDiskImage::unserialize(), gem5::ruby::RubySystem::unserialize(), and gem5::memory::PhysicalMemory::unserializeStore().
|
virtual |
initState() is called on each SimObject when not restoring from a checkpoint.
This provides a hook for state initializations that are only required for a "cold start".
Reimplemented in gem5::ArmISA::FsFreebsd, gem5::ArmISA::FsLinux, gem5::ArmISA::FsWorkload, gem5::ArmLinuxProcess32, gem5::ArmLinuxProcess64, gem5::ArmProcess32, gem5::ArmProcess64, gem5::fastmodel::CortexA76, gem5::KernelWorkload, gem5::memory::AbstractMemory, gem5::MipsProcess, gem5::PowerProcess, gem5::Process, gem5::RiscvISA::BareMetal, gem5::RiscvISA::BootloaderKernelWorkload, gem5::RiscvISA::FsLinux, gem5::RiscvProcess32, gem5::RiscvProcess64, gem5::Sparc32Process, gem5::Sparc64Process, gem5::SparcISA::FsWorkload, gem5::SparcProcess, gem5::TrafficGen, gem5::X86ISA::BareMetalWorkload, gem5::X86ISA::FsLinux, gem5::X86ISA::FsWorkload, gem5::X86ISA::I386Process, and gem5::X86ISA::X86_64Process.
Definition at line 91 of file sim_object.cc.
Referenced by gem5::CxxConfigManager::initState(), gem5::memory::AbstractMemory::initState(), gem5::RiscvISA::BareMetal::initState(), gem5::SparcISA::FsWorkload::initState(), gem5::TrafficGen::initState(), and gem5::X86ISA::BareMetalWorkload::initState().
|
virtual |
loadState() is called on each SimObject when restoring from a checkpoint.
The default implementation simply calls unserialize() if there is a corresponding section in the checkpoint. However, objects can override loadState() to get other behaviors, e.g., doing other programmed initializations after unserialize(), or complaining if no checkpoint section is found.
cp | Checkpoint to restore the state from. |
Definition at line 78 of file sim_object.cc.
References DPRINTF, gem5::Named::name(), gem5::CheckpointIn::sectionExists(), and gem5::Serializable::unserializeSection().
void gem5::objParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
SimObject *& | param ) |
To avoid circular dependencies the unserialization of SimObjects must be implemented here.
Definition at line 178 of file sim_object.cc.
References gem5::Serializable::currentSection(), fatal, gem5::CheckpointIn::find(), gem5::SimObject::getSimObjectResolver(), name(), and gem5::SimObjectResolver::resolveSimObject().
bool gem5::optParamIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T & | param, | ||
bool | do_warn = true ) |
This function is used for restoring optional parameters from the checkpoint.
cp | The checkpoint to be read from. |
name | Name of the parameter to be read. |
param | Value of the parameter to be read. |
do_warn | If the warn is set to true then the function prints the warning message. |
Definition at line 357 of file serialize.hh.
References gem5::Serializable::currentSection(), name(), gem5::paramInImpl(), and warn_if.
Referenced by gem5::mappingParamIn(), TEST_F(), gem5::EtherLink::Link::unserialize(), gem5::EthPacketData::unserialize(), gem5::loader::SymbolTable::unserialize(), gem5::MemState::unserialize(), gem5::Random::unserialize(), gem5::System::unserialize(), and gem5::Ticked::unserialize().
void gem5::paramIn | ( | CheckpointIn & | cp, |
const std::string & | name, | ||
T & | param ) |
This function is used for restoring parameters from a checkpoint.
os | The checkpoint to be restored from. |
name | Name of the parameter to be set. |
param | Value of the parameter to be restored. |
Definition at line 377 of file serialize.hh.
References gem5::Serializable::currentSection(), fatal_if, name(), and gem5::paramInImpl().
void gem5::paramOut | ( | CheckpointOut & | os, |
const std::string & | name, | ||
const T & | param ) |
This function is used for writing parameters to a checkpoint.
os | The checkpoint to be written to. |
name | Name of the parameter to be set. |
param | Value of the parameter to be written. |
Definition at line 327 of file serialize.hh.
References name(), gem5::X86ISA::os, and gem5::ShowParam< T, Enabled >::show().
|
pure virtual |
Find a SimObject given a full path name.
Implemented in gem5::CxxConfigManager::SimObjectResolver, and gem5::PybindSimObjectResolver.
Referenced by gem5::objParamIn().
|
inline |
This is the constructor for Scoped checkpoint section helper class.
Scoped checkpoint helper class creates a section within a checkpoint without the need for a separate serializeable object. It is mainly used within the Serializable class when serializing or unserializing section (see serializeSection() and unserializeSection()). It can also be used to maintain backwards compatibility in existing code that serializes structs that are not inheriting from Serializable into subsections.
When the class is instantiated, it appends a name to the active path in a checkpoint. The old path is later restored when the instance is destroyed. For example, serializeSection() could be implemented by instantiating a ScopedCheckpointSection and then calling serialize() on an object.
Definition at line 198 of file serialize.hh.
References name(), gem5::Serializable::ScopedCheckpointSection::nameOut(), and gem5::Serializable::ScopedCheckpointSection::pushName().
|
inline |
Definition at line 204 of file serialize.hh.
References name(), gem5::Serializable::ScopedCheckpointSection::nameOut(), and gem5::Serializable::ScopedCheckpointSection::pushName().
bool gem5::CheckpointIn::sectionExists | ( | const std::string & | section | ) |
Definition at line 203 of file serialize.cc.
References gem5::CheckpointIn::db, and gem5::IniFile::sectionExists().
Referenced by gem5::BaseSemihosting::FileBase::create(), gem5::SimObject::loadState(), gem5::GicV2::unserialize(), and gem5::HDLcd::unserialize().
gem5::Serializable::Serializable | ( | ) |
Definition at line 65 of file serialize.cc.
|
pure virtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implemented in gem5::AMDGPUDevice, gem5::AMDGPUInterruptHandler, gem5::AMDGPUVM, gem5::ArchTimer, gem5::ArmInterruptPin, gem5::ArmISA::Interrupts, gem5::ArmISA::ISA, gem5::ArmISA::PMU::CounterState, gem5::ArmISA::PMU, gem5::ArmISA::TlbEntry, gem5::BaseCache, gem5::BaseCPU, gem5::BaseISA, gem5::BasePixelPump::PixelEvent, gem5::BasePixelPump, gem5::BaseSemihosting::File, gem5::BaseSemihosting::FileBase, gem5::BaseSemihosting::FileFeatures, gem5::BaseSemihosting, gem5::BaseTrafficGen, gem5::CheckerCPU, gem5::Clint, gem5::ClockedObject, gem5::copy_engine_reg::ChanRegs, gem5::copy_engine_reg::Regs, gem5::CopyEngine::CopyEngineChannel, gem5::CopyEngine, gem5::CowDiskImage, gem5::CpuLocalTimer, gem5::CpuLocalTimer::Timer, gem5::DeviceFDEntry, gem5::DisplayTimings, gem5::DistEtherLink::Link, gem5::DistEtherLink, gem5::DistIface::RecvScheduler::Desc, gem5::DistIface::RecvScheduler, gem5::DistIface, gem5::DistIface::Sync, gem5::DistIface::SyncNode, gem5::DistIface::SyncSwitch, gem5::DmaReadFifo, gem5::DumbTOD, gem5::DVFSHandler, gem5::EmulationPageTable, gem5::EnergyCtrl, gem5::EtherLink, gem5::EtherSwitch::Interface::PortFifo, gem5::EtherSwitch::Interface::PortFifoEntry, gem5::EtherSwitch::Interface, gem5::EtherSwitch, gem5::EtherTapBase, gem5::EtherTapStub, gem5::Event, gem5::FDArray, gem5::FDEntry, gem5::FileFDEntry, gem5::FlashDevice, gem5::FrameBuffer, gem5::GenericISA::DelaySlotPCState< InstWidth >, gem5::GenericISA::DelaySlotPCState< 4 >, gem5::GenericISA::PCStateWithNext, gem5::GenericTimer::CoreTimers, gem5::GenericTimer, gem5::GenericTimerFrame, gem5::GenericWatchdog, gem5::GicV2::BankedRegs, gem5::GicV2, gem5::Gicv3, gem5::Gicv3CPUInterface, gem5::Gicv3Distributor, gem5::Gicv3Its, gem5::Gicv3Redistributor, gem5::Globals, gem5::GPUDispatcher, gem5::HDLcd::DmaEngine, gem5::HDLcd, gem5::HiFiveBase, gem5::I2CBus, gem5::IdeController, gem5::IdeDisk, gem5::IGbE::DescCache< T >, gem5::IGbE::DescCache< igbreg::RxDesc >, gem5::IGbE::DescCache< igbreg::TxDesc >, gem5::IGbE::RxDescCache, gem5::IGbE, gem5::IGbE::TxDescCache, gem5::igbreg::Regs, gem5::Iob, gem5::Iris::Interrupts, gem5::Iris::ISA, gem5::KernelWorkload, gem5::LocalSimLoopExitEvent, gem5::LupV, gem5::Malta, gem5::MaltaCChip, gem5::MaltaIO, gem5::memory::CfiMemory::BlockData, gem5::memory::CfiMemory::ProgramBuffer, gem5::memory::CfiMemory, gem5::memory::DRAMSys, gem5::memory::PhysicalMemory, gem5::MemPool, gem5::MemPools, gem5::MemState, gem5::MinorCPU, gem5::MipsISA::Interrupts, gem5::MipsISA::TLB, gem5::MmDisk, gem5::MultiLevelPageTable< EntryTypes >, gem5::NoMaliGpu, gem5::NSGigE, gem5::o3::ThreadState, gem5::PciDevice, gem5::PCStateBase, gem5::PipeFDEntry, gem5::Pl011, gem5::PL031, gem5::Pl050, gem5::Pl111, gem5::Plic, gem5::PM4PacketProcessor, gem5::PollEvent, gem5::PowerISA::TLB, gem5::PowerState, gem5::Process, gem5::ps2::Device, gem5::ps2::PS2Keyboard, gem5::ps2::PS2Mouse, gem5::ps2::TouchKit, gem5::Random, gem5::RealViewCtrl, gem5::RealViewOsc, gem5::RiscvISA::BootloaderKernelWorkload, gem5::RiscvISA::Interrupts, gem5::RiscvISA::ISA, gem5::RiscvISA::PCState, gem5::RiscvISA::TLB, gem5::RiscvISA::TlbEntry, gem5::RiscvRTC, gem5::Root, gem5::ruby::RubySystem, gem5::SDMAEngine, gem5::SEWorkload, gem5::SimObject, gem5::SimpleThread, gem5::sinic::Base, gem5::sinic::Device, gem5::SMMUv3, gem5::Sp804, gem5::Sp804::Timer, gem5::Sp805, gem5::SparcISA::Interrupts, gem5::SparcISA::ISA, gem5::SparcISA::TLB, gem5::SrcClockDomain, gem5::System, gem5::SystemCounter, gem5::ThreadState, gem5::Ticked, gem5::TickedObject, gem5::TrafficGen, gem5::Uart8250, gem5::UFSHostDevice, gem5::VegaISA::GpuTLB, gem5::VGic, gem5::VirtIO9PProxy, gem5::VirtIODeviceBase, gem5::VirtQueue, gem5::VoltageDomain, gem5::X86ISA::Cmos, gem5::X86ISA::GpuTLB, gem5::X86ISA::I8042, gem5::X86ISA::I82094AA, gem5::X86ISA::I8237, gem5::X86ISA::I8254, gem5::X86ISA::I8259, gem5::X86ISA::Interrupts, gem5::X86ISA::ISA, gem5::X86ISA::PCState, gem5::X86ISA::Speaker, gem5::X86ISA::TLB, gem5::X86ISA::TlbEntry, and SerializableType.
Referenced by gem5::SrcClockDomain::serialize(), and gem5::Serializable::serializeSection().
void gem5::Serializable::serializeSection | ( | CheckpointOut & | cp, |
const char * | name ) const |
Serialize an object into a new section.
This method creates a new section in a checkpoint and calls serialize() to serialize the current object into that section. The name of the section is appended to the current checkpoint path.
cp | Checkpoint state |
name | Name to append to the active path |
Definition at line 74 of file serialize.cc.
References name(), and gem5::Serializable::serialize().
Referenced by gem5::AMDGPUDevice::serialize(), gem5::ArmISA::PMU::serialize(), gem5::CopyEngine::serialize(), gem5::CpuLocalTimer::serialize(), gem5::DistEtherLink::serialize(), gem5::DistIface::serialize(), gem5::GenericTimer::serialize(), gem5::GenericTimerFrame::serialize(), gem5::Gicv3::serialize(), gem5::IGbE::serialize(), gem5::MemPools::serialize(), gem5::Root::serialize(), gem5::Sp804::serialize(), gem5::System::serialize(), gem5::VGic::serialize(), gem5::VirtIODeviceBase::serialize(), gem5::SimObject::serializeAll(), gem5::Serializable::serializeSection(), and TEST_F().
|
inline |
Definition at line 271 of file serialize.hh.
References name(), and gem5::Serializable::serializeSection().
|
static |
Set the current directory.
This function takes care of inserting curTick() if there's a 'd' in the argument, and appends a '/' if necessary. The final name is returned.
Definition at line 142 of file serialize.cc.
References gem5::csprintf(), gem5::curTick(), and name().
Referenced by gem5::Serializable::generateCheckpointOut(), TEST(), TEST(), TEST_F(), and TEST_F().
|
pure virtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implemented in gem5::AMDGPUDevice, gem5::AMDGPUInterruptHandler, gem5::AMDGPUVM, gem5::ArchTimer, gem5::ArmInterruptPin, gem5::ArmISA::Interrupts, gem5::ArmISA::ISA, gem5::ArmISA::PMU::CounterState, gem5::ArmISA::PMU, gem5::ArmISA::TlbEntry, gem5::BaseCache, gem5::BaseCPU, gem5::BasePixelPump::PixelEvent, gem5::BasePixelPump, gem5::BaseSemihosting::File, gem5::BaseSemihosting::FileBase, gem5::BaseSemihosting::FileFeatures, gem5::BaseSemihosting, gem5::BaseTrafficGen, gem5::CheckerCPU, gem5::Clint, gem5::ClockedObject, gem5::copy_engine_reg::ChanRegs, gem5::copy_engine_reg::Regs, gem5::CopyEngine::CopyEngineChannel, gem5::CopyEngine, gem5::CowDiskImage, gem5::CpuLocalTimer::Timer, gem5::CpuLocalTimer, gem5::DeviceFDEntry, gem5::DisplayTimings, gem5::DistEtherLink::Link, gem5::DistEtherLink, gem5::DistIface::RecvScheduler::Desc, gem5::DistIface::RecvScheduler, gem5::DistIface::Sync, gem5::DistIface::SyncNode, gem5::DistIface::SyncSwitch, gem5::DistIface, gem5::DmaReadFifo, gem5::DumbTOD, gem5::DVFSHandler, gem5::EmulationPageTable, gem5::EnergyCtrl, gem5::EtherLink, gem5::EtherSwitch::Interface::PortFifo, gem5::EtherSwitch::Interface::PortFifoEntry, gem5::EtherSwitch::Interface, gem5::EtherSwitch, gem5::EtherTapBase, gem5::EtherTapStub, gem5::Event, gem5::FDArray, gem5::FDEntry, gem5::FileFDEntry, gem5::FlashDevice, gem5::FrameBuffer, gem5::GenericISA::DelaySlotPCState< InstWidth >, gem5::GenericISA::DelaySlotPCState< 4 >, gem5::GenericISA::PCStateWithNext, gem5::GenericTimer::CoreTimers, gem5::GenericTimer, gem5::GenericTimerFrame, gem5::GenericWatchdog, gem5::GicV2::BankedRegs, gem5::GicV2, gem5::Gicv3, gem5::Gicv3CPUInterface, gem5::Gicv3Distributor, gem5::Gicv3Its, gem5::Gicv3Redistributor, gem5::Globals, gem5::GPUDispatcher, gem5::HDLcd::DmaEngine, gem5::HDLcd, gem5::HiFiveBase, gem5::I2CBus, gem5::IdeController, gem5::IdeDisk, gem5::IGbE::DescCache< T >, gem5::IGbE::DescCache< igbreg::RxDesc >, gem5::IGbE::DescCache< igbreg::TxDesc >, gem5::IGbE::RxDescCache, gem5::IGbE::TxDescCache, gem5::IGbE, gem5::igbreg::Regs, gem5::Iob, gem5::Iris::Interrupts, gem5::KernelWorkload, gem5::LocalSimLoopExitEvent, gem5::LupV, gem5::Malta, gem5::MaltaCChip, gem5::MaltaIO, gem5::memory::CfiMemory::BlockData, gem5::memory::CfiMemory::ProgramBuffer, gem5::memory::CfiMemory, gem5::memory::DRAMSys, gem5::memory::PhysicalMemory, gem5::MemPool, gem5::MemPools, gem5::MemState, gem5::MinorCPU, gem5::MipsISA::Interrupts, gem5::MipsISA::TLB, gem5::MultiLevelPageTable< EntryTypes >, gem5::NoMaliGpu, gem5::NSGigE, gem5::o3::ThreadState, gem5::PciDevice, gem5::PCStateBase, gem5::PipeFDEntry, gem5::Pl011, gem5::PL031, gem5::Pl050, gem5::Pl111, gem5::Plic, gem5::PM4PacketProcessor, gem5::PollEvent, gem5::PowerISA::TLB, gem5::PowerState, gem5::Process, gem5::ps2::Device, gem5::ps2::PS2Keyboard, gem5::ps2::PS2Mouse, gem5::ps2::TouchKit, gem5::Random, gem5::RealViewCtrl, gem5::RealViewOsc, gem5::RiscvISA::BootloaderKernelWorkload, gem5::RiscvISA::Interrupts, gem5::RiscvISA::ISA, gem5::RiscvISA::PCState, gem5::RiscvISA::TLB, gem5::RiscvISA::TlbEntry, gem5::RiscvRTC, gem5::Root, gem5::ruby::RubySystem, gem5::SDMAEngine, gem5::SEWorkload, gem5::SimObject, gem5::SimpleThread, gem5::sinic::Base, gem5::sinic::Device, gem5::SMMUv3, gem5::Sp804::Timer, gem5::Sp804, gem5::Sp805, gem5::SparcISA::Interrupts, gem5::SparcISA::ISA, gem5::SparcISA::TLB, gem5::SrcClockDomain, gem5::System, gem5::SystemCounter, gem5::ThreadState, gem5::Ticked, gem5::TickedObject, gem5::TrafficGen, gem5::Uart8250, gem5::UFSHostDevice, gem5::VegaISA::GpuTLB, gem5::VGic, gem5::VirtIO9PProxy, gem5::VirtIODeviceBase, gem5::VirtQueue, gem5::VoltageDomain, gem5::X86ISA::Cmos, gem5::X86ISA::GpuTLB, gem5::X86ISA::I8042, gem5::X86ISA::I82094AA, gem5::X86ISA::I8237, gem5::X86ISA::I8254, gem5::X86ISA::I8259, gem5::X86ISA::Interrupts, gem5::X86ISA::ISA, gem5::X86ISA::PCState, gem5::X86ISA::Speaker, gem5::X86ISA::TLB, gem5::X86ISA::TlbEntry, and SerializableType.
Referenced by gem5::SrcClockDomain::unserialize(), and gem5::Serializable::unserializeSection().
void gem5::Serializable::unserializeSection | ( | CheckpointIn & | cp, |
const char * | name ) |
Unserialize an a child object.
This method loads a child object from a checkpoint. The object name is appended to the active path to form a fully qualified section name and unserialize() is called.
cp | Checkpoint state |
name | Name to append to the active path |
Definition at line 81 of file serialize.cc.
References name(), and gem5::Serializable::unserialize().
Referenced by gem5::SimObject::loadState(), TEST_F(), gem5::AMDGPUDevice::unserialize(), gem5::ArmISA::PMU::unserialize(), gem5::CopyEngine::unserialize(), gem5::CpuLocalTimer::unserialize(), gem5::DistEtherLink::unserialize(), gem5::DistIface::RecvScheduler::unserialize(), gem5::DistIface::unserialize(), gem5::EtherSwitch::Interface::PortFifo::unserialize(), gem5::GenericTimer::unserialize(), gem5::GenericTimerFrame::unserialize(), gem5::Gicv3::unserialize(), gem5::IGbE::unserialize(), gem5::MemPools::unserialize(), gem5::Root::unserialize(), gem5::Sp804::unserialize(), gem5::System::unserialize(), gem5::VirtIODeviceBase::unserialize(), and gem5::Serializable::unserializeSection().
|
inline |
Definition at line 292 of file serialize.hh.
References name(), and gem5::Serializable::unserializeSection().
void gem5::CheckpointIn::visitSection | ( | const std::string & | section, |
IniFile::VisitSectionCallback | cb ) |
Definition at line 209 of file serialize.cc.
References gem5::CheckpointIn::db, and gem5::IniFile::visitSection().
Referenced by gem5::mappingParamIn().