|
gem5
v19.0.0.0
|
#include "cpu/thread_context.hh"#include "arch/generic/vec_pred_reg.hh"#include "base/logging.hh"#include "base/trace.hh"#include "config/the_isa.hh"#include "cpu/base.hh"#include "cpu/quiesce_event.hh"#include "debug/Context.hh"#include "debug/Quiesce.hh"#include "kern/kernel_stats.hh"#include "params/BaseCPU.hh"#include "sim/full_system.hh"Go to the source code of this file.
Functions | |
| void | serialize (const ThreadContext &tc, CheckpointOut &cp) |
| Thread context serialization helpers. More... | |
| void | unserialize (ThreadContext &tc, CheckpointIn &cp) |
| void | takeOverFrom (ThreadContext &ntc, ThreadContext &otc) |
| Copy state between thread contexts in preparation for CPU handover. More... | |
| void serialize | ( | const ThreadContext & | tc, |
| CheckpointOut & | cp | ||
| ) |
Thread context serialization helpers.
These helper functions provide a way to the data in a ThreadContext. They are provided as separate helper function since implementing them as members of the ThreadContext interface would be confusing when the ThreadContext is exported via a proxy.
Definition at line 166 of file thread_context.cc.
References arrayParamOut(), ArmISA::i, AlphaISA::NumCCRegs, AlphaISA::NumFloatRegs, AlphaISA::NumIntRegs, AlphaISA::NumVecPredRegs, AlphaISA::NumVecRegs, ThreadContext::pcState(), ThreadContext::readCCRegFlat(), ThreadContext::readFloatRegFlat(), ThreadContext::readIntRegFlat(), ThreadContext::readVecPredRegFlat(), ThreadContext::readVecRegFlat(), SERIALIZE_ARRAY, and SERIALIZE_CONTAINER.
Referenced by BaseCPU::cacheLineSize(), NSGigE::cpuIntrAck(), ArmISA::EndBitUnion(), ThreadContext::exit(), PhysicalMemory::getBackingStore(), LocalSimLoopExitEvent::getCode(), IdeDisk::getLBABase(), Event::globalEvent(), Globals::Globals(), CPA::hwWe(), Serializable::ScopedCheckpointSection::nameOut(), AlphaISA::TlbEntry::pageStart(), ClockedObject::params(), AnnotateDumpCallback::process(), IdeController::serialize(), VGic::serialize(), GenericISA::UPCState< MachInst >::serialize(), X86ISA::PCState::serialize(), GenericISA::DelaySlotPCState< MachInst >::serialize(), GenericISA::DelaySlotUPCState< MachInst >::serialize(), Serializable::serializeSection(), SparcISA::TlbEntry::updateVaddr(), RiscvISA::PTE::Valid(), MipsISA::PTE::Valid(), PowerISA::PTE::Valid(), SimpleThread::~SimpleThread(), and VirtQueue::~VirtQueue().
| void takeOverFrom | ( | ThreadContext & | new_tc, |
| ThreadContext & | old_tc | ||
| ) |
Copy state between thread contexts in preparation for CPU handover.
| new_tc | Destination ThreadContext. |
| old_tc | Source ThreadContext. |
Definition at line 250 of file thread_context.cc.
References ThreadContext::contextId(), ThreadContext::copyArchRegs(), FullSystem, ThreadContext::getCpuPtr(), ThreadContext::getProcessPtr(), ThreadContext::getQuiesceEvent(), ThreadContext::getSystemPtr(), ThreadContext::Halted, ThreadContext::setContextId(), ThreadContext::setStatus(), ThreadContext::setThreadId(), ThreadContext::status(), and ThreadContext::threadId().
Referenced by ThreadContext::exit(), MemDepUnit< MemDepPred, Impl >::name(), BaseCPU::params(), O3ThreadContext< Impl >::setStatus(), O3ThreadContext< Impl >::takeOverFrom(), SimpleThread::~SimpleThread(), and ThreadContext::~ThreadContext().
| void unserialize | ( | ThreadContext & | tc, |
| CheckpointIn & | cp | ||
| ) |
Definition at line 207 of file thread_context.cc.
References arrayParamIn(), ArmISA::i, AlphaISA::NumCCRegs, AlphaISA::NumFloatRegs, AlphaISA::NumIntRegs, AlphaISA::NumVecPredRegs, AlphaISA::NumVecRegs, ThreadContext::pcState(), ThreadContext::setCCRegFlat(), ThreadContext::setFloatRegFlat(), ThreadContext::setIntRegFlat(), ThreadContext::setVecPredRegFlat(), ThreadContext::setVecRegFlat(), UNSERIALIZE_ARRAY, and UNSERIALIZE_CONTAINER.
Referenced by BaseCPU::cacheLineSize(), NSGigE::cpuIntrAck(), ArmISA::EndBitUnion(), ThreadContext::exit(), PhysicalMemory::getBackingStore(), LocalSimLoopExitEvent::getCode(), IdeDisk::getLBABase(), Event::globalEvent(), Globals::Globals(), CPA::hwWe(), Serializable::ScopedCheckpointSection::nameOut(), AlphaISA::TlbEntry::pageStart(), ClockedObject::params(), AnnotateDumpCallback::process(), IdeController::unserialize(), VGic::unserialize(), GenericISA::UPCState< MachInst >::unserialize(), X86ISA::PCState::unserialize(), GenericISA::DelaySlotPCState< MachInst >::unserialize(), GenericISA::DelaySlotUPCState< MachInst >::unserialize(), Serializable::unserializeSection(), SparcISA::TlbEntry::updateVaddr(), RiscvISA::PTE::Valid(), MipsISA::PTE::Valid(), PowerISA::PTE::Valid(), SimpleThread::~SimpleThread(), and VirtQueue::~VirtQueue().