gem5  v21.1.0.2
Typedefs | Functions | Variables
The Event Queue API.

These methods relate to the event queue interface. More...

Typedefs

typedef int8_t gem5::EventBase::Priority
 

Functions

virtual void gem5::Event::trace (const char *action)
 This function isn't really useful if TRACING_ON is not defined. More...
 
bool gem5::Event::scheduled () const
 Determine if the current event is scheduled. More...
 
void gem5::Event::squash ()
 Squash the current event. More...
 
bool gem5::Event::squashed () const
 Check whether the event is squashed. More...
 
bool gem5::Event::isExitEvent () const
 See if this is a SimExitEvent (without resorting to RTTI) More...
 
bool gem5::Event::isManaged () const
 Check whether this event will auto-delete. More...
 
bool gem5::Event::isAutoDelete () const
 The function returns true if the object is automatically deleted after the event is processed. More...
 
Tick gem5::Event::when () const
 Get the time that the event is scheduled. More...
 
Priority gem5::Event::priority () const
 Get the event priority. More...
 
bool gem5::operator< (const Event &l, const Event &r)
 
bool gem5::operator> (const Event &l, const Event &r)
 
bool gem5::operator<= (const Event &l, const Event &r)
 
bool gem5::operator>= (const Event &l, const Event &r)
 
bool gem5::operator== (const Event &l, const Event &r)
 
bool gem5::operator!= (const Event &l, const Event &r)
 
 gem5::EventQueue::ScopedMigration::ScopedMigration (EventQueue *_new_eq, bool _doMigrate=true)
 Temporarily migrate execution to a different event queue. More...
 
 gem5::EventQueue::EventQueue (const std::string &n)
 
void gem5::EventQueue::schedule (Event *event, Tick when, bool global=false)
 Schedule the given event on this queue. More...
 
void gem5::EventQueue::deschedule (Event *event)
 Deschedule the specified event. More...
 
void gem5::EventQueue::reschedule (Event *event, Tick when, bool always=false)
 Reschedule the specified event. More...
 
Tick gem5::EventQueue::getCurTick () const
 While curTick() is useful for any object assigned to this event queue, if an object that is assigned to another event queue (or a non-event object) need to access the current tick of this event queue, this function is used. More...
 
void gem5::EventQueue::serviceEvents (Tick when)
 process all events up to the given timestamp. More...
 
bool gem5::EventQueue::empty () const
 Returns true if no events are queued. More...
 
void gem5::EventQueue::dump () const
 This is a debugging function which will print everything on the event queue. More...
 
virtual void gem5::EventQueue::wakeup (Tick when=(Tick) -1)
 Function to signal that the event loop should be woken up because an event has been scheduled by an agent outside the gem5 event loop(s) whose event insertion may not have been noticed by gem5. More...
 
EventQueuegem5::EventManager::eventQueue () const
 
void gem5::EventManager::schedule (Event &event, Tick when)
 
void gem5::EventManager::deschedule (Event &event)
 
void gem5::EventManager::reschedule (Event &event, Tick when, bool always=false)
 
void gem5::EventManager::schedule (Event *event, Tick when)
 
void gem5::EventManager::deschedule (Event *event)
 
void gem5::EventManager::reschedule (Event *event, Tick when, bool always=false)
 
void gem5::EventManager::wakeupEventQueue (Tick when=(Tick) -1)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More...
 
 gem5::EventFunctionWrapper::EventFunctionWrapper (const std::function< void(void)> &callback, const std::string &name, bool del=false, Priority p=Default_Pri)
 This function wraps a function into an event, to be executed later. More...
 
void gem5::EventFunctionWrapper::process ()
 
const std::string gem5::EventFunctionWrapper::name () const
 
const char * gem5::EventFunctionWrapper::description () const
 Return a C string describing the event. More...
 

Variables

static const Priority gem5::EventBase::Minimum_Pri = SCHAR_MIN
 Event priorities, to provide tie-breakers for events scheduled at the same cycle. More...
 
static const Priority gem5::EventBase::Debug_Enable_Pri = -101
 If we enable tracing on a particular cycle, do that as the very first thing so we don't miss any of the events on that cycle (even if we enter the debugger). More...
 
static const Priority gem5::EventBase::Debug_Break_Pri = -100
 Breakpoints should happen before anything else (except enabling trace output), so we don't miss any action when debugging. More...
 
static const Priority gem5::EventBase::CPU_Switch_Pri = -31
 CPU switches schedule the new CPU's tick event for the same cycle (after unscheduling the old CPU's tick event). More...
 
static const Priority gem5::EventBase::Delayed_Writeback_Pri = -1
 For some reason "delayed" inter-cluster writebacks are scheduled before regular writebacks (which have default priority). More...
 
static const Priority gem5::EventBase::Default_Pri = 0
 Default is zero for historical reasons. More...
 
static const Priority gem5::EventBase::DVFS_Update_Pri = 31
 DVFS update event leads to stats dump therefore given a lower priority to ensure all relevant states have been updated. More...
 
static const Priority gem5::EventBase::Serialize_Pri = 32
 Serailization needs to occur before tick events also, so that a serialize/unserialize is identical to an on-line CPU switch. More...
 
static const Priority gem5::EventBase::CPU_Tick_Pri = 50
 CPU ticks must come after other associated CPU events (such as writebacks). More...
 
static const Priority gem5::EventBase::CPU_Exit_Pri = 64
 If we want to exit a thread in a CPU, it comes after CPU_Tick_Pri. More...
 
static const Priority gem5::EventBase::Stat_Event_Pri = 90
 Statistics events (dump, reset, etc.) come after everything else, but before exit. More...
 
static const Priority gem5::EventBase::Progress_Event_Pri = 95
 Progress events come at the end. More...
 
static const Priority gem5::EventBase::Sim_Exit_Pri = 100
 If we want to exit on this cycle, it's the very last thing we do. More...
 
static const Priority gem5::EventBase::Maximum_Pri = SCHAR_MAX
 Maximum priority. More...
 
virtual gem5::Event::~Event ()
 
virtual const std::string gem5::Event::name () const
 
virtual const char * gem5::Event::description () const
 Return a C string describing the event. More...
 
void gem5::Event::dump () const
 Dump the current event data. More...
 
virtual const std::string gem5::EventQueue::name () const
 
void gem5::EventQueue::name (const std::string &st)
 
 gem5::EventManager::EventManager (EventManager &em)
 Event manger manages events in the event queue. More...
 
 gem5::EventManager::EventManager (EventManager *em)
 
 gem5::EventManager::EventManager (EventQueue *eq)
 

Detailed Description

These methods relate to the event queue interface.

Typedef Documentation

◆ Priority

typedef int8_t gem5::EventBase::Priority

Definition at line 123 of file eventq.hh.

Function Documentation

◆ deschedule() [1/3]

void gem5::EventManager::deschedule ( Event event)
inline

◆ deschedule() [2/3]

void gem5::EventQueue::deschedule ( Event event)
inline

◆ deschedule() [3/3]

void gem5::EventManager::deschedule ( Event event)
inline

◆ description() [1/2]

const char * gem5::Event::description ( ) const
virtual

◆ description() [2/2]

const char* gem5::EventFunctionWrapper::description ( ) const
inlinevirtual

Return a C string describing the event.

This string should not be dynamically allocated; just a const char array describing the event class.

Reimplemented from gem5::Event.

Definition at line 1155 of file eventq.hh.

◆ dump() [1/2]

void gem5::Event::dump ( ) const

◆ dump() [2/2]

void gem5::EventQueue::dump ( ) const

This is a debugging function which will print everything on the event queue.

Definition at line 289 of file eventq.cc.

References gem5::cprintf(), gem5::curTick(), gem5::Event::dump(), gem5::EventQueue::empty(), gem5::EventQueue::head, gem5::Event::nextBin, and gem5::Event::nextInBin.

Referenced by gem5::pybind_init_event().

◆ empty()

bool gem5::EventQueue::empty ( ) const
inline

◆ EventFunctionWrapper()

gem5::EventFunctionWrapper::EventFunctionWrapper ( const std::function< void(void)> &  callback,
const std::string &  name,
bool  del = false,
Priority  p = Default_Pri 
)
inline

This function wraps a function into an event, to be executed later.

Definition at line 1128 of file eventq.hh.

References gem5::EventBase::AutoDelete, and gem5::Event::setFlags().

◆ EventManager() [1/3]

gem5::EventManager::EventManager ( EventManager em)
inline

Event manger manages events in the event queue.

Where you can schedule and deschedule different events.

Definition at line 1001 of file eventq.hh.

◆ EventManager() [2/3]

gem5::EventManager::EventManager ( EventManager em)
inline

Definition at line 1002 of file eventq.hh.

◆ EventManager() [3/3]

gem5::EventManager::EventManager ( EventQueue eq)
inline

Definition at line 1003 of file eventq.hh.

◆ eventQueue()

EventQueue* gem5::EventManager::eventQueue ( ) const
inline

◆ EventQueue()

gem5::EventQueue::EventQueue ( const std::string &  n)

Definition at line 418 of file eventq.cc.

◆ getCurTick()

Tick gem5::EventQueue::getCurTick ( ) const
inline

While curTick() is useful for any object assigned to this event queue, if an object that is assigned to another event queue (or a non-event object) need to access the current tick of this event queue, this function is used.

Tick is the unit of time used in gem5.

Returns
Tick The current tick of this event queue.

Definition at line 857 of file eventq.hh.

References gem5::EventQueue::_curTick.

Referenced by gem5::o3::ThreadContext::getCurrentInstCount(), gem5::SimpleThread::getCurrentInstCount(), sc_gem5::Scheduler::getCurTick(), gem5::EventQueue::reschedule(), and gem5::EventQueue::schedule().

◆ isAutoDelete()

bool gem5::Event::isAutoDelete ( ) const
inline

The function returns true if the object is automatically deleted after the event is processed.

Definition at line 501 of file eventq.hh.

References gem5::Event::isManaged().

Referenced by gem5::ruby::RubySystem::memWriteback().

◆ isExitEvent()

bool gem5::Event::isExitEvent ( ) const
inline

See if this is a SimExitEvent (without resorting to RTTI)

Definition at line 486 of file eventq.hh.

References gem5::Event::flags, gem5::EventBase::IsExitEvent, and gem5::Flags< T >::isSet().

Referenced by gem5::pybind_init_event().

◆ isManaged()

bool gem5::Event::isManaged ( ) const
inline

Check whether this event will auto-delete.

Definition at line 493 of file eventq.hh.

References gem5::Event::flags, gem5::Flags< T >::isSet(), and gem5::EventBase::Managed.

Referenced by gem5::Event::isAutoDelete().

◆ name() [1/4]

const std::string gem5::Event::name ( ) const
virtual

◆ name() [2/4]

virtual const std::string gem5::EventQueue::name ( ) const
inlinevirtual

Definition at line 754 of file eventq.hh.

References gem5::EventQueue::objName.

◆ name() [3/4]

const std::string gem5::EventFunctionWrapper::name ( ) const
inlinevirtual

Reimplemented from gem5::Event.

Definition at line 1147 of file eventq.hh.

References gem5::EventFunctionWrapper::_name.

◆ name() [4/4]

void gem5::EventQueue::name ( const std::string &  st)
inline

Definition at line 755 of file eventq.hh.

References gem5::EventQueue::objName, and gem5::ArmISA::st.

◆ operator!=()

bool gem5::operator!= ( const Event l,
const Event r 
)
inline

Definition at line 579 of file eventq.hh.

References gem5::MipsISA::l, and gem5::MipsISA::r.

◆ operator<()

bool gem5::operator< ( const Event l,
const Event r 
)
inline

Definition at line 530 of file eventq.hh.

References gem5::MipsISA::l, and gem5::MipsISA::r.

◆ operator<=()

bool gem5::operator<= ( const Event l,
const Event r 
)
inline

Definition at line 550 of file eventq.hh.

References gem5::MipsISA::l, and gem5::MipsISA::r.

◆ operator==()

bool gem5::operator== ( const Event l,
const Event r 
)
inline

Definition at line 570 of file eventq.hh.

References gem5::MipsISA::l, and gem5::MipsISA::r.

◆ operator>()

bool gem5::operator> ( const Event l,
const Event r 
)
inline

Definition at line 540 of file eventq.hh.

References gem5::MipsISA::l, and gem5::MipsISA::r.

◆ operator>=()

bool gem5::operator>= ( const Event l,
const Event r 
)
inline

Definition at line 560 of file eventq.hh.

References gem5::MipsISA::l, and gem5::MipsISA::r.

◆ priority()

Priority gem5::Event::priority ( ) const
inline

Get the event priority.

Definition at line 515 of file eventq.hh.

References gem5::Event::_priority.

Referenced by gem5::EventQueue::debugVerify(), and gem5::pybind_init_event().

◆ process()

void gem5::EventFunctionWrapper::process ( )
inlinevirtual

◆ reschedule() [1/3]

void gem5::EventManager::reschedule ( Event event,
Tick  when,
bool  always = false 
)
inline

◆ reschedule() [2/3]

void gem5::EventQueue::reschedule ( Event event,
Tick  when,
bool  always = false 
)
inline

◆ reschedule() [3/3]

void gem5::EventManager::reschedule ( Event event,
Tick  when,
bool  always = false 
)
inline

◆ schedule() [1/3]

void gem5::EventManager::schedule ( Event event,
Tick  when 
)
inline

Definition at line 1019 of file eventq.hh.

References gem5::MipsISA::event, gem5::EventManager::eventq, and gem5::EventQueue::schedule().

Referenced by gem5::memory::DRAMSim2::accessAndRespond(), gem5::memory::DRAMsim3::accessAndRespond(), gem5::FlashDevice::accessDevice(), gem5::memory::DRAMInterface::activateBank(), gem5::BaseKvmCPU::activateContext(), gem5::MinorCPU::activateContext(), gem5::AtomicSimpleCPU::activateContext(), gem5::TimingSimpleCPU::activateContext(), gem5::BasePixelPump::beginLine(), gem5::TraceCPU::checkAndSchedExitEvent(), gem5::TesterThread::checkDeadlock(), gem5::memory::DRAMInterface::Rank::checkDrainDone(), gem5::memory::DRAMInterface::checkRefreshState(), gem5::IGbE::chkInterrupt(), gem5::memory::NVMInterface::chooseRead(), gem5::HDLcd::cmdEnable(), gem5::ruby::GPUCoalescer::completeHitCallback(), gem5::sinic::Base::cpuIntrPost(), gem5::NSGigE::cpuIntrPost(), gem5::CPUProgressEvent::CPUProgressEvent(), gem5::TraceCPU::dcacheRetryRecvd(), gem5::prefetch::BOP::delayQueueEventWrapper(), gem5::GPUDispatcher::dispatch(), gem5::ComputeUnit::dispWorkgroup(), gem5::Pl111::dmaDone(), gem5::DmaVirtDevice::dmaVirt(), gem5::memory::DRAMInterface::doBurstAccess(), gem5::memory::NVMInterface::doBurstAccess(), gem5::IdeDisk::doDmaDataRead(), gem5::IdeDisk::doDmaDataWrite(), gem5::IdeDisk::doDmaRead(), gem5::IdeDisk::doDmaTransfer(), gem5::IdeDisk::doDmaWrite(), gem5::ThermalModel::doStep(), gem5::TimingSimpleCPU::drain(), gem5::BaseKvmCPU::drainResume(), gem5::AtomicSimpleCPU::drainResume(), gem5::o3::CPU::drainResume(), gem5::TimingSimpleCPU::drainResume(), gem5::RegisterFile::enqRegBusyEvent(), gem5::RegisterFile::enqRegFreeEvent(), gem5::ruby::RubySystem::enqueueRubyEvent(), gem5::ComputeUnit::exec(), gem5::Shader::execScheduledAdds(), gem5::GoodbyeObject::fillBuffer(), gem5::BaseKvmCPU::finishMMIOPending(), gem5::o3::Fetch::finishTranslation(), gem5::compression::FrequentValues::generateCodes(), gem5::o3::Commit::generateTrapEvent(), gem5::SimpleCache::handleRequest(), gem5::DmaPort::handleResp(), gem5::X86ISA::GpuTLB::handleTranslationReturn(), gem5::RubyDirectedTester::hitCallback(), gem5::TraceCPU::icacheRetryRecvd(), gem5::TraceCPU::init(), gem5::ComputeUnit::injectGlobalMemFence(), gem5::prefetch::BOP::insertIntoDelayQueue(), gem5::ruby::Sequencer::insertRequest(), gem5::TimingSimpleCPU::IprEvent::IprEvent(), gem5::ruby::VIPERCoalescer::issueRequest(), gem5::X86ISA::GpuTLB::issueTLBLookup(), gem5::ruby::GPUCoalescer::makeRequest(), gem5::ArmISA::TableWalker::nextWalk(), gem5::GPUDispatcher::notifyWgCompl(), gem5::DVFSHandler::perfLevel(), gem5::IGbE::postInterrupt(), gem5::memory::DRAMInterface::prechargeBank(), gem5::CPUProgressEvent::process(), gem5::prefetch::AccessMapPatternMatching::processEpochEvent(), gem5::HelloObject::processEvent(), gem5::SparcISA::ISA::processHSTickCompare(), gem5::memory::DRAMInterface::Rank::processPowerEvent(), gem5::memory::NVMInterface::processReadReadyEvent(), gem5::memory::DRAMInterface::Rank::processRefreshEvent(), gem5::SparcISA::ISA::processSTickCompare(), gem5::memory::NVMInterface::processWriteRespondEvent(), gem5::Plic::propagateOutput(), gem5::PowerDomain::pwrStateChangeCallback(), gem5::o3::LSQUnit::read(), gem5::Pl111::readFramebuffer(), gem5::BaseCache::recvAtomic(), gem5::MemTest::recvRetry(), gem5::StubSlavePort::recvTimingReq(), gem5::TLBCoalescer::CpuSidePort::recvTimingReq(), gem5::memory::SimpleMemory::recvTimingReq(), gem5::memory::CfiMemory::recvTimingReq(), gem5::X86ISA::Walker::recvTimingResp(), gem5::RiscvISA::Walker::recvTimingResp(), gem5::TimingSimpleCPU::DcachePort::recvTimingResp(), gem5::ComputeUnit::DataPort::recvTimingResp(), gem5::BasePixelPump::renderPixels(), gem5::System::Threads::replace(), gem5::IGbE::restartClock(), gem5::PL031::resyncMatch(), gem5::EtherTapBase::retransmit(), gem5::Gicv3Its::runProcessTiming(), gem5::NSGigE::rxKick(), gem5::CommMonitor::samplePeriodic(), gem5::HSAPacketProcessor::schedAQLProcessing(), gem5::SMMUv3DeviceInterface::schedAtsTimingResp(), gem5::TraceCPU::schedDcacheNextEvent(), gem5::TraceCPU::schedIcacheNext(), gem5::PacketQueue::schedSendEvent(), gem5::TimingSimpleCPU::TimingCPUPort::TickEvent::schedule(), gem5::o3::LSQUnit::schedule(), gem5::MipsISA::ISA::scheduleCP0Update(), gem5::TesterThread::scheduleDeadlockCheckEvent(), gem5::SMMUv3DeviceInterface::scheduleDeviceRetry(), gem5::GPUDispatcher::scheduleDispatch(), gem5::Uart8250::scheduleIntr(), gem5::ruby::Consumer::scheduleNextWakeup(), gem5::memory::DRAMInterface::Rank::schedulePowerEvent(), gem5::BaseCPU::schedulePowerGatingEvent(), gem5::o3::InstructionQueue::scheduleReadyInsts(), gem5::o3::CPU::scheduleThreadExitEvent(), gem5::o3::CPU::scheduleTickEvent(), gem5::BaseTrafficGen::scheduleUpdate(), gem5::TesterThread::scheduleWakeup(), gem5::SMMUProcess::scheduleWakeup(), gem5::memory::DRAMInterface::Rank::scheduleWakeUpEvent(), gem5::HWScheduler::schedWakeup(), gem5::Iris::ThreadContext::semihostingEvent(), gem5::EtherBus::send(), gem5::ComputeUnit::sendRequest(), gem5::memory::DRAMSim2::sendResponse(), gem5::memory::DRAMsim3::sendResponse(), gem5::EtherTapBase::sendSimulated(), gem5::SparcISA::ISA::setFSReg(), gem5::Pl011::setInterrupts(), gem5::Intel8254Timer::Counter::CounterEvent::setTo(), gem5::BasePixelPump::start(), gem5::IdeDisk::startDma(), sc_gem5::Kernel::startup(), gem5::HelloObject::startup(), gem5::CommMonitor::startup(), gem5::BaseKvmCPU::startup(), gem5::ThermalModel::startup(), gem5::MC146818::startup(), gem5::prefetch::AccessMapPatternMatching::startup(), gem5::memory::DRAMSim2::startup(), gem5::memory::DRAMsim3::startup(), gem5::memory::DRAMInterface::Rank::startup(), gem5::BaseCPU::suspendContext(), gem5::GarnetSyntheticTraffic::tick(), gem5::MemTest::tick(), gem5::IGbE::tick(), gem5::memory::DRAMSim2::tick(), gem5::memory::DRAMsim3::tick(), gem5::o3::CPU::tick(), gem5::BaseKvmCPU::tick(), gem5::Root::timeSync(), gem5::Root::timeSyncEnable(), gem5::X86ISA::GpuTLB::translationReturn(), gem5::NSGigE::transmit(), gem5::DmaPort::trySendTimingReq(), gem5::NSGigE::txKick(), gem5::GPUDispatcher::unserialize(), gem5::sinic::Base::unserialize(), gem5::PL031::unserialize(), gem5::EnergyCtrl::unserialize(), gem5::Plic::unserialize(), gem5::SparcISA::ISA::unserialize(), gem5::DVFSHandler::unserialize(), gem5::VGic::unserialize(), gem5::Uart8250::unserialize(), gem5::BaseTrafficGen::unserialize(), gem5::sinic::Device::unserialize(), gem5::NSGigE::unserialize(), gem5::Pl111::unserialize(), gem5::IdeDisk::unserialize(), gem5::GicV2::unserialize(), gem5::IGbE::unserialize(), gem5::ArchTimer::updateCounter(), gem5::GPUDispatcher::updateInvCounter(), gem5::Plic::updateOutput(), gem5::TLBCoalescer::updatePhysAddresses(), gem5::HDLcd::virtRefresh(), gem5::o3::CPU::wakeCPU(), gem5::RubyDirectedTester::wakeup(), gem5::ruby::Sequencer::wakeup(), gem5::RubyTester::wakeup(), gem5::ruby::GPUCoalescer::wakeup(), gem5::EnergyCtrl::write(), gem5::o3::LSQUnit::writebackStores(), gem5::SMMUv3::writeControl(), and gem5::MC146818::writeData().

◆ schedule() [2/3]

void gem5::EventManager::schedule ( Event event,
Tick  when 
)
inline

◆ schedule() [3/3]

void gem5::EventQueue::schedule ( Event event,
Tick  when,
bool  global = false 
)
inline

◆ scheduled()

bool gem5::Event::scheduled ( ) const
inline

Determine if the current event is scheduled.

Definition at line 465 of file eventq.hh.

References gem5::Event::flags, gem5::Flags< T >::isSet(), and gem5::EventBase::Scheduled.

Referenced by gem5::memory::DRAMSim2::accessAndRespond(), gem5::memory::DRAMsim3::accessAndRespond(), gem5::FlashDevice::accessDevice(), gem5::memory::DRAMInterface::activateBank(), gem5::BaseKvmCPU::activateContext(), gem5::AtomicSimpleCPU::activateContext(), gem5::BaseCPU::activateContext(), gem5::TimingSimpleCPU::activateContext(), gem5::BasePixelPump::PixelEvent::active(), gem5::memory::MemCtrl::addToReadQueue(), gem5::memory::MemCtrl::addToWriteQueue(), gem5::TesterThread::checkDeadlock(), gem5::memory::DRAMInterface::checkRefreshState(), gem5::IGbE::chkInterrupt(), gem5::memory::NVMInterface::chooseRead(), gem5::GPUComputeDriver::EventList::clearEvents(), gem5::HDLcd::cmdDisable(), gem5::ruby::GPUCoalescer::completeHitCallback(), gem5::MemTest::completeRequest(), gem5::IGbE::cpuPostInt(), gem5::BaseRemoteGDB::descheduleInstCommitEvent(), gem5::BaseCPU::deschedulePowerGatingEvent(), gem5::GPUDispatcher::dispatch(), gem5::Shader::dispatchWorkgroups(), gem5::ComputeUnit::dispWorkgroup(), gem5::Pl111::dmaDone(), gem5::memory::DRAMInterface::doBurstAccess(), gem5::memory::NVMInterface::doBurstAccess(), gem5::FlashDevice::drain(), gem5::BaseKvmCPU::drain(), gem5::AtomicSimpleCPU::drain(), gem5::BaseTrafficGen::drain(), gem5::o3::CPU::drain(), gem5::ArchTimer::drain(), gem5::TimingSimpleCPU::drain(), gem5::IGbE::drain(), gem5::memory::MemCtrl::drain(), gem5::BaseKvmCPU::drainResume(), gem5::AtomicSimpleCPU::drainResume(), gem5::o3::CPU::drainResume(), gem5::TimingSimpleCPU::drainResume(), gem5::Event::dump(), gem5::IGbE::ethRxPkt(), gem5::BaseKvmCPU::finishMMIOPending(), gem5::o3::Fetch::finishTranslation(), gem5::o3::CPU::haltContext(), gem5::DmaPort::handleResp(), gem5::GenericTimer::handleStream(), gem5::X86ISA::GpuTLB::handleTranslationReturn(), gem5::IGbE::DescCache< igbreg::RxDesc >::hasOutstandingEvents(), gem5::DmaThread::hitCallback(), gem5::GpuWavefront::hitCallback(), gem5::BaseRemoteGDB::incomingData(), gem5::prefetch::BOP::insertIntoDelayQueue(), gem5::ruby::Sequencer::insertRequest(), gem5::TimingSimpleCPU::isCpuDrained(), gem5::ruby::Sequencer::isDeadlockEventScheduled(), gem5::ruby::GPUCoalescer::isDeadlockEventScheduled(), gem5::o3::Fetch::isDrained(), gem5::TesterThread::issueNextAction(), gem5::GpuWavefront::issueReleaseOp(), gem5::ruby::VIPERCoalescer::issueRequest(), gem5::ruby::GPUCoalescer::makeRequest(), gem5::BaseKvmCPU::notifyFork(), gem5::GPUDispatcher::notifyWgCompl(), gem5::DVFSHandler::perfLevel(), gem5::IGbE::postInterrupt(), gem5::memory::DRAMInterface::prechargeBank(), gem5::LdsState::process(), gem5::memory::MemCtrl::processNextReqEvent(), gem5::memory::NVMInterface::processReadReadyEvent(), gem5::memory::MemCtrl::processRespondEvent(), gem5::memory::NVMInterface::processWriteRespondEvent(), gem5::Plic::propagateOutput(), gem5::pybind_init_event(), gem5::UFSHostDevice::readDevice(), gem5::Pl111::readFramebuffer(), gem5::TLBCoalescer::CpuSidePort::recvTimingReq(), gem5::memory::SimpleMemory::recvTimingReq(), gem5::memory::CfiMemory::recvTimingReq(), gem5::X86ISA::Walker::recvTimingResp(), gem5::RiscvISA::Walker::recvTimingResp(), gem5::TimingSimpleCPU::DcachePort::recvTimingResp(), sc_gem5::Scheduler::TimeSlot::releaseImpl(), gem5::Event::releaseImpl(), gem5::memory::MemCtrl::requestEventScheduled(), gem5::memory::DRAMInterface::respondEvent(), gem5::memory::MemCtrl::respondEventScheduled(), gem5::IGbE::restartClock(), gem5::PL031::resyncMatch(), gem5::EtherTapBase::retransmit(), gem5::LdsState::returnQueuePush(), gem5::Gicv3Its::runProcessTiming(), gem5::NSGigE::rxKick(), gem5::HSAPacketProcessor::schedAQLProcessing(), gem5::TraceCPU::schedDcacheNextEvent(), gem5::PacketQueue::schedSendEvent(), gem5::Shader::ScheduleAdd(), gem5::TesterThread::scheduleDeadlockCheckEvent(), gem5::SMMUv3DeviceInterface::scheduleDeviceRetry(), gem5::GPUDispatcher::scheduleDispatch(), gem5::ruby::Consumer::scheduleNextWakeup(), gem5::BaseCPU::schedulePowerGatingEvent(), gem5::o3::CPU::scheduleThreadExitEvent(), gem5::o3::CPU::scheduleTickEvent(), gem5::TesterThread::scheduleWakeup(), gem5::HWScheduler::schedWakeup(), gem5::Iris::ThreadContext::semihostingEvent(), gem5::DmaPort::sendDma(), gem5::memory::DRAMSim2::sendResponse(), gem5::memory::DRAMsim3::sendResponse(), gem5::EtherTapBase::sendSimulated(), gem5::Sp805::serialize(), gem5::GenericWatchdog::serialize(), gem5::GPUDispatcher::serialize(), gem5::PL031::serialize(), gem5::EnergyCtrl::serialize(), gem5::SystemCounter::serialize(), gem5::SparcISA::ISA::serialize(), gem5::Uart8250::serialize(), gem5::BaseTrafficGen::serialize(), gem5::sinic::Device::serialize(), gem5::NSGigE::serialize(), gem5::Pl111::serialize(), gem5::IdeDisk::serialize(), gem5::IGbE::serialize(), gem5::BaseCache::CacheResponsePort::setBlocked(), gem5::SparcISA::ISA::setFSReg(), gem5::Pl011::setInterrupts(), gem5::Iris::ThreadContext::setStatus(), gem5::Ticked::start(), gem5::Pl111::startDma(), gem5::MC146818::startup(), gem5::Ticked::stop(), gem5::BasePixelPump::stop(), gem5::BaseKvmCPU::suspendContext(), gem5::AtomicSimpleCPU::suspendContext(), gem5::TimingSimpleCPU::suspendContext(), gem5::BaseKvmCPU::switchOut(), gem5::AtomicSimpleCPU::switchOut(), gem5::TimingSimpleCPU::switchOut(), gem5::BaseKvmCPU::takeOverFrom(), gem5::AtomicSimpleCPU::takeOverFrom(), gem5::o3::CPU::takeOverFrom(), gem5::GarnetSyntheticTraffic::tick(), gem5::MemTest::tick(), gem5::o3::CPU::tick(), gem5::UFSHostDevice::transferHandler(), gem5::BaseTrafficGen::transition(), gem5::NSGigE::transmit(), gem5::o3::CPU::tryDrain(), gem5::NSGigE::txKick(), gem5::HWScheduler::unregisterQueue(), gem5::o3::CPU::unscheduleTickEvent(), gem5::GPUDispatcher::unserialize(), gem5::Event::unserialize(), gem5::ArchTimer::updateCounter(), gem5::GPUDispatcher::updateInvCounter(), gem5::TLBCoalescer::updatePhysAddresses(), gem5::Sp805::value(), gem5::o3::CPU::wakeCPU(), gem5::TesterThread::wakeup(), gem5::Sp805::write(), gem5::EnergyCtrl::write(), gem5::MC146818::writeData(), gem5::UFSHostDevice::writeDevice(), gem5::Uart8250::writeIer(), gem5::AtomicSimpleCPU::~AtomicSimpleCPU(), gem5::Event::~Event(), and gem5::Iris::ThreadContext::~ThreadContext().

◆ ScopedMigration()

gem5::EventQueue::ScopedMigration::ScopedMigration ( EventQueue _new_eq,
bool  _doMigrate = true 
)
inline

Temporarily migrate execution to a different event queue.

An instance of this class temporarily migrates execution to different event queue by releasing the current queue, locking the new queue, and updating curEventQueue(). This can, for example, be useful when performing IO across thread event queues when timing is not crucial (e.g., during fast forwarding).

ScopedMigration does nothing if both eqs are the same

Definition at line 689 of file eventq.hh.

References gem5::EventQueue::curEventQueue, gem5::EventQueue::ScopedMigration::doMigrate, gem5::EventQueue::lock(), gem5::EventQueue::ScopedMigration::new_eq, gem5::EventQueue::ScopedMigration::old_eq, and gem5::EventQueue::unlock().

◆ serviceEvents()

void gem5::EventQueue::serviceEvents ( Tick  when)
inline

process all events up to the given timestamp.

we inline a quick test to see if there are any events to process; if so, call the internal out-of-line version to process them all.

Notes:

  • This is only used for "instruction" event queues. Instead of counting ticks, this is actually counting instructions.
  • This updates the current tick value to the value of the entry at the head of the queue.
Todo:
this assert is a good bug catcher. I need to make it true again.

Definition at line 876 of file eventq.hh.

References gem5::EventQueue::empty(), gem5::EventQueue::nextTick(), gem5::EventQueue::serviceOne(), and gem5::EventQueue::setCurTick().

Referenced by gem5::minor::Execute::doInstCommitAccounting(), gem5::Iris::ThreadContext::maintainStepping(), and gem5::BaseSimpleCPU::serviceInstCountEvents().

◆ squash()

void gem5::Event::squash ( )
inline

◆ squashed()

bool gem5::Event::squashed ( ) const
inline

Check whether the event is squashed.

Definition at line 479 of file eventq.hh.

References gem5::Event::flags, gem5::Flags< T >::isSet(), and gem5::EventBase::Squashed.

Referenced by gem5::pybind_init_event(), and gem5::o3::CPU::scheduleTickEvent().

◆ trace()

void gem5::Event::trace ( const char *  action)
protectedvirtual

This function isn't really useful if TRACING_ON is not defined.

trace event activity

Definition at line 379 of file eventq.cc.

References gem5::Event::description(), DPRINTF, gem5::Event::instanceString(), and gem5::Event::when().

◆ wakeup()

virtual void gem5::EventQueue::wakeup ( Tick  when = (Tick)-1)
inlinevirtual

Function to signal that the event loop should be woken up because an event has been scheduled by an agent outside the gem5 event loop(s) whose event insertion may not have been noticed by gem5.

This function isn't needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 onto other schedulers.

Parameters
whenTime of a delayed wakeup (if known). This parameter can be used by an implementation to schedule a wakeup in the future if it is sure it will remain active until then. Or it can be ignored and the event queue can be woken up now.

Definition at line 930 of file eventq.hh.

Referenced by gem5::dumprstStatsHandler(), gem5::dumpStatsHandler(), gem5::exitNowHandler(), gem5::ioHandler(), gem5::PollQueue::setupAsyncIO(), and gem5::EventManager::wakeupEventQueue().

◆ wakeupEventQueue()

void gem5::EventManager::wakeupEventQueue ( Tick  when = (Tick)-1)
inline

This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers.

Definition at line 1075 of file eventq.hh.

References gem5::EventManager::eventq, and gem5::EventQueue::wakeup().

◆ when()

Tick gem5::Event::when ( ) const
inline

◆ ~Event()

gem5::Event::~Event ( )
virtual

Definition at line 77 of file eventq.cc.

References gem5::Event::flags, and gem5::Event::scheduled().

Variable Documentation

◆ CPU_Exit_Pri

const Priority gem5::EventBase::CPU_Exit_Pri = 64
static

If we want to exit a thread in a CPU, it comes after CPU_Tick_Pri.

Definition at line 211 of file eventq.hh.

◆ CPU_Switch_Pri

const Priority gem5::EventBase::CPU_Switch_Pri = -31
static

CPU switches schedule the new CPU's tick event for the same cycle (after unscheduling the old CPU's tick event).

The switch needs to come before any tick events to make sure we don't tick both CPUs in the same cycle.

Definition at line 163 of file eventq.hh.

◆ CPU_Tick_Pri

const Priority gem5::EventBase::CPU_Tick_Pri = 50
static

CPU ticks must come after other associated CPU events (such as writebacks).

Definition at line 204 of file eventq.hh.

Referenced by gem5::o3::Commit::generateTrapEvent(), and gem5::MipsISA::ISA::scheduleCP0Update().

◆ Debug_Break_Pri

const Priority gem5::EventBase::Debug_Break_Pri = -100
static

Breakpoints should happen before anything else (except enabling trace output), so we don't miss any action when debugging.

Definition at line 153 of file eventq.hh.

◆ Debug_Enable_Pri

const Priority gem5::EventBase::Debug_Enable_Pri = -101
static

If we enable tracing on a particular cycle, do that as the very first thing so we don't miss any of the events on that cycle (even if we enter the debugger).

Definition at line 144 of file eventq.hh.

◆ Default_Pri

const Priority gem5::EventBase::Default_Pri = 0
static

Default is zero for historical reasons.

Definition at line 179 of file eventq.hh.

Referenced by sc_gem5::getPriorityOfTlmPhase(), and gem5::pybind_init_event().

◆ Delayed_Writeback_Pri

const Priority gem5::EventBase::Delayed_Writeback_Pri = -1
static

For some reason "delayed" inter-cluster writebacks are scheduled before regular writebacks (which have default priority).

Steve?

Definition at line 172 of file eventq.hh.

◆ DVFS_Update_Pri

const Priority gem5::EventBase::DVFS_Update_Pri = 31
static

DVFS update event leads to stats dump therefore given a lower priority to ensure all relevant states have been updated.

Definition at line 187 of file eventq.hh.

◆ Maximum_Pri

const Priority gem5::EventBase::Maximum_Pri = SCHAR_MAX
static

Maximum priority.

Definition at line 241 of file eventq.hh.

◆ Minimum_Pri

const Priority gem5::EventBase::Minimum_Pri = SCHAR_MIN
static

Event priorities, to provide tie-breakers for events scheduled at the same cycle.

Most events are scheduled at the default priority; these values are used to control events that need to be ordered within a cycle. Minimum priority

Definition at line 135 of file eventq.hh.

◆ Progress_Event_Pri

const Priority gem5::EventBase::Progress_Event_Pri = 95
static

Progress events come at the end.

Definition at line 226 of file eventq.hh.

Referenced by gem5::simulate().

◆ Serialize_Pri

const Priority gem5::EventBase::Serialize_Pri = 32
static

Serailization needs to occur before tick events also, so that a serialize/unserialize is identical to an on-line CPU switch.

Definition at line 196 of file eventq.hh.

◆ Sim_Exit_Pri

const Priority gem5::EventBase::Sim_Exit_Pri = 100
static

If we want to exit on this cycle, it's the very last thing we do.

Definition at line 234 of file eventq.hh.

Referenced by gem5::Iris::ThreadContext::ThreadContext().

◆ Stat_Event_Pri

const Priority gem5::EventBase::Stat_Event_Pri = 90
static

Statistics events (dump, reset, etc.) come after everything else, but before exit.

Definition at line 219 of file eventq.hh.


Generated on Tue Sep 21 2021 12:27:00 for gem5 by doxygen 1.8.17