gem5
v20.1.0.0
|
#include <algorithm>
#include <cassert>
#include <climits>
#include <functional>
#include <iosfwd>
#include <memory>
#include <mutex>
#include <string>
#include "base/debug.hh"
#include "base/flags.hh"
#include "base/types.hh"
#include "debug/Event.hh"
#include "sim/serialize.hh"
Go to the source code of this file.
Classes | |
class | EventBase |
Common base class for Event and GlobalEvent, so they can share flag and priority definitions and accessor functions. More... | |
class | Event |
class | EventQueue |
Queue of events sorted in time order. More... | |
class | EventQueue::ScopedMigration |
class | EventQueue::ScopedRelease |
class | EventManager |
class | EventWrapper< T, F > |
class | EventFunctionWrapper |
Functions | |
EventQueue * | getEventQueue (uint32_t index) |
Function for returning eventq queue for the provided index. More... | |
EventQueue * | curEventQueue () |
void | curEventQueue (EventQueue *q) |
bool | operator< (const Event &l, const Event &r) |
bool | operator> (const Event &l, const Event &r) |
bool | operator<= (const Event &l, const Event &r) |
bool | operator>= (const Event &l, const Event &r) |
bool | operator== (const Event &l, const Event &r) |
bool | operator!= (const Event &l, const Event &r) |
void | dumpMainQueue () |
Variables | |
Tick | simQuantum |
Simulation Quantum for multiple eventq simulation. More... | |
uint32_t | numMainEventQueues |
Current number of allocated main event queues. More... | |
std::vector< EventQueue * > | mainEventQueue |
Array for main event queues. More... | |
__thread EventQueue * | _curEventQueue |
The current event queue for the running thread. More... | |
bool | inParallelMode |
Current mode of execution: parallel / serial. More... | |
|
inline |
Definition at line 83 of file eventq.hh.
References _curEventQueue.
Referenced by abortHandler(), BaseGlobalEvent::deschedule(), EventQueue::deschedule(), doSimLoop(), BaseGlobalEvent::BarrierEvent::globalBarrier(), EventQueue::handleAsyncInsertions(), StatTest::init(), DistIface::RecvScheduler::init(), BaseKvmCPU::kvmRun(), GlobalSyncEvent::BarrierEvent::process(), DistIface::SyncEvent::process(), DistIface::RecvScheduler::pushPacket(), pybind_init_event(), DistIface::recvThreadFunc(), EventQueue::reschedule(), StatTest::run(), EventQueue::schedule(), EventQueue::ScopedMigration::ScopedMigration(), BaseKvmCPU::tick(), and EventQueue::ScopedMigration::~ScopedMigration().
|
inline |
Definition at line 84 of file eventq.hh.
References _curEventQueue, and ArmISA::q.
void dumpMainQueue | ( | ) |
Definition at line 363 of file eventq.cc.
References ArmISA::i, mainEventQueue, and numMainEventQueues.
EventQueue* getEventQueue | ( | uint32_t | index | ) |
Function for returning eventq queue for the provided index.
The function allocates a new queue in case one does not exist for the index, provided that the index is with in bounds.
Definition at line 61 of file eventq.cc.
References csprintf(), MipsISA::index, mainEventQueue, and numMainEventQueues.
Referenced by dumprstStatsHandler(), dumpStatsHandler(), exitNowHandler(), StatTest::init(), ioHandler(), pybind_init_event(), and PollQueue::setupAsyncIO().
__thread EventQueue* _curEventQueue |
The current event queue for the running thread.
Access to this queue does not require any locking from the thread.
Definition at line 57 of file eventq.cc.
Referenced by curEventQueue(), and curTick().
bool inParallelMode |
Current mode of execution: parallel / serial.
Definition at line 58 of file eventq.cc.
Referenced by EventQueue::deschedule(), EventQueue::reschedule(), EventQueue::schedule(), and simulate().
std::vector<EventQueue *> mainEventQueue |
Array for main event queues.
Definition at line 56 of file eventq.cc.
Referenced by BaseGlobalEvent::deschedule(), LdsState::TickEvent::deschedule(), Trace::TarmacParserRecord::dump(), dumpMainQueue(), eventqDump(), getEventQueue(), BaseGlobalEvent::reschedule(), BaseGlobalEvent::schedule(), LdsState::TickEvent::schedule(), simulate(), and Serializable::unserializeGlobals().
uint32_t numMainEventQueues |
Current number of allocated main event queues.
Definition at line 55 of file eventq.cc.
Referenced by BaseGlobalEventTemplate< GlobalSyncEvent >::BaseGlobalEventTemplate(), BaseGlobalEvent::deschedule(), dumpMainQueue(), eventqDump(), getEventQueue(), BaseGlobalEvent::reschedule(), BaseGlobalEvent::schedule(), BaseGlobalEvent::scheduled(), simulate(), Serializable::unserializeGlobals(), BaseGlobalEvent::when(), and BaseGlobalEvent::~BaseGlobalEvent().
Tick simQuantum |
Simulation Quantum for multiple eventq simulation.
The quantum value is the period length after which the queues synchronize themselves with each other. This means that any event to scheduled on Queue A which is generated by an event on Queue B should be at least simQuantum ticks away in future.
Definition at line 47 of file eventq.cc.
Referenced by exitSimLoop(), Stats::schedStatEvent(), and simulate().