|
gem5
v20.1.0.5
|
#include <iostream>#include <string>#include "arch/generic/htm.hh"#include "arch/generic/isa.hh"#include "arch/registers.hh"#include "arch/types.hh"#include "base/types.hh"#include "config/the_isa.hh"#include "cpu/pc_event.hh"#include "cpu/reg_class.hh"Go to the source code of this file.
Classes | |
| class | ThreadContext |
| ThreadContext is the external interface to all thread state for anything outside of the CPU. More... | |
Namespaces | |
| TheISA | |
Functions | |
| void | takeOverFrom (ThreadContext &new_tc, ThreadContext &old_tc) |
| Copy state between thread contexts in preparation for CPU handover. More... | |
| void | serialize (const ThreadContext &tc, CheckpointOut &cp) |
| Thread context serialization helpers. More... | |
| void | unserialize (ThreadContext &tc, CheckpointIn &cp) |
| 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 142 of file thread_context.cc.
References arrayParamOut(), ArmISA::i, ArmISA::NumCCRegs, ArmISA::NumFloatRegs, ArmISA::NumIntRegs, ArmISA::NumVecPredRegs, ArmISA::NumVecRegs, ThreadContext::pcState(), ThreadContext::readCCRegFlat(), ThreadContext::readFloatRegFlat(), ThreadContext::readIntRegFlat(), ThreadContext::readVecPredRegFlat(), ThreadContext::readVecRegFlat(), SERIALIZE_ARRAY, and SERIALIZE_CONTAINER.
Referenced by exitSimLoop(), and Serializable::serializeSection().
| 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 226 of file thread_context.cc.
References ThreadContext::contextId(), ThreadContext::copyArchRegs(), FullSystem, ThreadContext::getProcessPtr(), ThreadContext::getSystemPtr(), ThreadContext::Halted, ThreadContext::setContextId(), ThreadContext::setStatus(), ThreadContext::setThreadId(), ThreadContext::status(), and ThreadContext::threadId().
Referenced by O3ThreadContext< Impl >::takeOverFrom().
| void unserialize | ( | ThreadContext & | tc, |
| CheckpointIn & | cp | ||
| ) |
Definition at line 183 of file thread_context.cc.
References arrayParamIn(), ArmISA::i, ArmISA::NumCCRegs, ArmISA::NumFloatRegs, ArmISA::NumIntRegs, ArmISA::NumVecPredRegs, ArmISA::NumVecRegs, ThreadContext::pcState(), ThreadContext::setCCRegFlat(), ThreadContext::setFloatRegFlat(), ThreadContext::setIntRegFlat(), ThreadContext::setVecPredRegFlat(), ThreadContext::setVecRegFlat(), UNSERIALIZE_ARRAY, and UNSERIALIZE_CONTAINER.
Referenced by Serializable::unserializeSection().