gem5  v20.1.0.0
Functions File Reference
#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 "debug/Context.hh"
#include "debug/Quiesce.hh"
#include "params/BaseCPU.hh"
#include "sim/full_system.hh"

Go to the source code of this file.


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...

Function Documentation

◆ serialize()

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

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().

◆ takeOverFrom()

void takeOverFrom ( ThreadContext new_tc,
ThreadContext old_tc 

Copy state between thread contexts in preparation for CPU handover.

This method modifies the old thread contexts as well as the new thread context. The old thread context will have its quiesce event descheduled if it is scheduled and its status set to halted.
new_tcDestination ThreadContext.
old_tcSource ThreadContext.

Definition at line 226 of file

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().

◆ unserialize()

void unserialize ( ThreadContext tc,
CheckpointIn cp 

Generated on Wed Sep 30 2020 14:02:18 for gem5 by doxygen 1.8.17