gem5
|
ProxyThreadContext class that provides a way to implement a ThreadContext without having to derive from it. More...
#include <thread_context.hh>
Public Member Functions | |
ProxyThreadContext (TC *actual_tc) | |
BaseCPU * | getCpuPtr () |
int | cpuId () const |
uint32_t | socketId () const |
int | threadId () const |
void | setThreadId (int id) |
int | contextId () const |
void | setContextId (int id) |
TheISA::TLB * | getITBPtr () |
TheISA::TLB * | getDTBPtr () |
CheckerCPU * | getCheckerCpuPtr () |
TheISA::Decoder * | getDecoderPtr () |
System * | getSystemPtr () |
TheISA::Kernel::Statistics * | getKernelStats () |
PortProxy & | getPhysProxy () |
FSTranslatingPortProxy & | getVirtProxy () |
void | initMemProxies (ThreadContext *tc) |
Initialise the physical and virtual port proxies and tie them to the data port of the CPU. More... | |
SETranslatingPortProxy & | getMemProxy () |
Process * | getProcessPtr () |
void | setProcessPtr (Process *p) |
Status | status () const |
void | setStatus (Status new_status) |
void | activate () |
Set the status to Active. More... | |
void | suspend () |
Set the status to Suspended. More... | |
void | halt () |
Set the status to Halted. More... | |
void | quiesce () |
Quiesce thread context. More... | |
void | quiesceTick (Tick resume) |
Quiesce, suspend, and schedule activate at resume. More... | |
void | dumpFuncProfile () |
void | takeOverFrom (ThreadContext *oldContext) |
void | regStats (const std::string &name) |
EndQuiesceEvent * | getQuiesceEvent () |
Tick | readLastActivate () |
Tick | readLastSuspend () |
void | profileClear () |
void | profileSample () |
void | copyArchRegs (ThreadContext *tc) |
void | clearArchRegs () |
uint64_t | readIntReg (int reg_idx) |
FloatReg | readFloatReg (int reg_idx) |
FloatRegBits | readFloatRegBits (int reg_idx) |
CCReg | readCCReg (int reg_idx) |
void | setIntReg (int reg_idx, uint64_t val) |
void | setFloatReg (int reg_idx, FloatReg val) |
void | setFloatRegBits (int reg_idx, FloatRegBits val) |
void | setCCReg (int reg_idx, CCReg val) |
TheISA::PCState | pcState () |
void | pcState (const TheISA::PCState &val) |
void | pcStateNoRecord (const TheISA::PCState &val) |
Addr | instAddr () |
Addr | nextInstAddr () |
MicroPC | microPC () |
bool | readPredicate () |
void | setPredicate (bool val) |
MiscReg | readMiscRegNoEffect (int misc_reg) const |
MiscReg | readMiscReg (int misc_reg) |
void | setMiscRegNoEffect (int misc_reg, const MiscReg &val) |
void | setMiscReg (int misc_reg, const MiscReg &val) |
int | flattenIntIndex (int reg) |
int | flattenFloatIndex (int reg) |
int | flattenCCIndex (int reg) |
int | flattenMiscIndex (int reg) |
unsigned | readStCondFailures () |
void | setStCondFailures (unsigned sc_failures) |
void | syscall (int64_t callnum, Fault *fault) |
Counter | readFuncExeInst () |
uint64_t | readIntRegFlat (int idx) |
Flat register interfaces. More... | |
void | setIntRegFlat (int idx, uint64_t val) |
FloatReg | readFloatRegFlat (int idx) |
void | setFloatRegFlat (int idx, FloatReg val) |
FloatRegBits | readFloatRegBitsFlat (int idx) |
void | setFloatRegBitsFlat (int idx, FloatRegBits val) |
CCReg | readCCRegFlat (int idx) |
void | setCCRegFlat (int idx, CCReg val) |
Public Member Functions inherited from ThreadContext | |
virtual | ~ThreadContext () |
void | quiesce () |
Quiesce thread context. More... | |
void | quiesceTick (Tick resume) |
Quiesce, suspend, and schedule activate at resume. More... | |
void | setNPC (Addr val) |
virtual uint64_t | readRegOtherThread (int misc_reg, ThreadID tid) |
virtual void | setRegOtherThread (int misc_reg, const MiscReg &val, ThreadID tid) |
virtual int | exit () |
Private Attributes | |
TC * | actualTC |
Additional Inherited Members | |
Public Types inherited from ThreadContext | |
enum | Status { Active, Suspended, Halted } |
Static Public Member Functions inherited from ThreadContext | |
static void | compare (ThreadContext *one, ThreadContext *two) |
function to compare two thread contexts (for debugging) More... | |
Protected Types inherited from ThreadContext | |
typedef TheISA::MachInst | MachInst |
typedef TheISA::IntReg | IntReg |
typedef TheISA::FloatReg | FloatReg |
typedef TheISA::FloatRegBits | FloatRegBits |
typedef TheISA::CCReg | CCReg |
typedef TheISA::MiscReg | MiscReg |
ProxyThreadContext class that provides a way to implement a ThreadContext without having to derive from it.
ThreadContext is an abstract class, so anything that derives from it and uses its interface will pay the overhead of virtual function calls. This class is created to enable a user-defined Thread object to be used wherever ThreadContexts are used, without paying the overhead of virtual function calls when it is used by itself. See simple_thread.hh for an example of this.
Definition at line 325 of file thread_context.hh.
|
inline |
Definition at line 328 of file thread_context.hh.
|
inlinevirtual |
Set the status to Active.
Implements ThreadContext.
Definition at line 380 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 412 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 346 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 410 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 338 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 394 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 474 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 471 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 468 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 477 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 354 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 336 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 356 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 352 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 350 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 360 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 369 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 363 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 371 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 401 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 358 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 365 of file thread_context.hh.
|
inlinevirtual |
Set the status to Halted.
Implements ThreadContext.
Definition at line 386 of file thread_context.hh.
|
inlinevirtual |
Initialise the physical and virtual port proxies and tie them to the data port of the CPU.
tc ThreadContext for the virtual-to-physical translation
Implements ThreadContext.
Definition at line 367 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 447 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 449 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 448 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 441 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 443 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 445 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 406 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 407 of file thread_context.hh.
|
inline |
Quiesce thread context.
Definition at line 389 of file thread_context.hh.
|
inline |
Quiesce, suspend, and schedule activate at resume.
Definition at line 392 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 426 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 509 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 420 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 423 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 503 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 497 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 489 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 417 of file thread_context.hh.
|
inlinevirtual |
Flat register interfaces.
Some architectures have different registers visible in different modes. Such architectures "flatten" a register (see flattenIntIndex() and flattenFloatIndex()) to map it into the gem5 register file. This interface provides a flat interface to the underlying register file, which allows for example serialization code to access all registers.
Implements ThreadContext.
Definition at line 491 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 403 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 404 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 459 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 456 of file thread_context.hh.
|
inline |
Definition at line 451 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 480 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 399 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 438 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 512 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 348 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 432 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 435 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 506 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 500 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 429 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 494 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 465 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 462 of file thread_context.hh.
|
inline |
Definition at line 453 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 373 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 377 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 483 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 344 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 340 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 375 of file thread_context.hh.
|
inlinevirtual |
Set the status to Suspended.
Implements ThreadContext.
Definition at line 383 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 486 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 396 of file thread_context.hh.
|
inlinevirtual |
Implements ThreadContext.
Definition at line 342 of file thread_context.hh.
Referenced by SimpleThread::name().
|
private |
Definition at line 332 of file thread_context.hh.
Referenced by ProxyThreadContext< SimpleThread >::activate(), ProxyThreadContext< SimpleThread >::clearArchRegs(), ProxyThreadContext< SimpleThread >::contextId(), ProxyThreadContext< SimpleThread >::copyArchRegs(), ProxyThreadContext< SimpleThread >::cpuId(), ProxyThreadContext< SimpleThread >::dumpFuncProfile(), ProxyThreadContext< SimpleThread >::flattenCCIndex(), ProxyThreadContext< SimpleThread >::flattenFloatIndex(), ProxyThreadContext< SimpleThread >::flattenIntIndex(), ProxyThreadContext< SimpleThread >::flattenMiscIndex(), ProxyThreadContext< SimpleThread >::getCheckerCpuPtr(), ProxyThreadContext< SimpleThread >::getCpuPtr(), ProxyThreadContext< SimpleThread >::getDecoderPtr(), ProxyThreadContext< SimpleThread >::getDTBPtr(), ProxyThreadContext< SimpleThread >::getITBPtr(), ProxyThreadContext< SimpleThread >::getKernelStats(), ProxyThreadContext< SimpleThread >::getMemProxy(), ProxyThreadContext< SimpleThread >::getPhysProxy(), ProxyThreadContext< SimpleThread >::getProcessPtr(), ProxyThreadContext< SimpleThread >::getQuiesceEvent(), ProxyThreadContext< SimpleThread >::getSystemPtr(), ProxyThreadContext< SimpleThread >::getVirtProxy(), ProxyThreadContext< SimpleThread >::halt(), ProxyThreadContext< SimpleThread >::initMemProxies(), ProxyThreadContext< SimpleThread >::instAddr(), ProxyThreadContext< SimpleThread >::microPC(), ProxyThreadContext< SimpleThread >::nextInstAddr(), ProxyThreadContext< SimpleThread >::pcState(), ProxyThreadContext< SimpleThread >::pcStateNoRecord(), ProxyThreadContext< SimpleThread >::profileClear(), ProxyThreadContext< SimpleThread >::profileSample(), ProxyThreadContext< SimpleThread >::ProxyThreadContext(), ProxyThreadContext< SimpleThread >::quiesce(), ProxyThreadContext< SimpleThread >::quiesceTick(), ProxyThreadContext< SimpleThread >::readCCReg(), ProxyThreadContext< SimpleThread >::readCCRegFlat(), ProxyThreadContext< SimpleThread >::readFloatReg(), ProxyThreadContext< SimpleThread >::readFloatRegBits(), ProxyThreadContext< SimpleThread >::readFloatRegBitsFlat(), ProxyThreadContext< SimpleThread >::readFloatRegFlat(), ProxyThreadContext< SimpleThread >::readFuncExeInst(), ProxyThreadContext< SimpleThread >::readIntReg(), ProxyThreadContext< SimpleThread >::readIntRegFlat(), ProxyThreadContext< SimpleThread >::readLastActivate(), ProxyThreadContext< SimpleThread >::readLastSuspend(), ProxyThreadContext< SimpleThread >::readMiscReg(), ProxyThreadContext< SimpleThread >::readMiscRegNoEffect(), ProxyThreadContext< SimpleThread >::readPredicate(), ProxyThreadContext< SimpleThread >::readStCondFailures(), ProxyThreadContext< SimpleThread >::regStats(), ProxyThreadContext< SimpleThread >::setCCReg(), ProxyThreadContext< SimpleThread >::setCCRegFlat(), ProxyThreadContext< SimpleThread >::setContextId(), ProxyThreadContext< SimpleThread >::setFloatReg(), ProxyThreadContext< SimpleThread >::setFloatRegBits(), ProxyThreadContext< SimpleThread >::setFloatRegBitsFlat(), ProxyThreadContext< SimpleThread >::setFloatRegFlat(), ProxyThreadContext< SimpleThread >::setIntReg(), ProxyThreadContext< SimpleThread >::setIntRegFlat(), ProxyThreadContext< SimpleThread >::setMiscReg(), ProxyThreadContext< SimpleThread >::setMiscRegNoEffect(), ProxyThreadContext< SimpleThread >::setPredicate(), ProxyThreadContext< SimpleThread >::setProcessPtr(), ProxyThreadContext< SimpleThread >::setStatus(), ProxyThreadContext< SimpleThread >::setStCondFailures(), ProxyThreadContext< SimpleThread >::setThreadId(), ProxyThreadContext< SimpleThread >::socketId(), ProxyThreadContext< SimpleThread >::status(), ProxyThreadContext< SimpleThread >::suspend(), ProxyThreadContext< SimpleThread >::syscall(), ProxyThreadContext< SimpleThread >::takeOverFrom(), and ProxyThreadContext< SimpleThread >::threadId().