Go to the documentation of this file.
38 #ifndef __CPU_KVM_TIMER_HH__
39 #define __CPU_KVM_TIMER_HH__
88 virtual void arm(
Tick ticks) = 0;
void arm(Tick ticks)
Arm the timer so that it fires after a certain number of ticks.
An instance of a performance counter.
virtual void disarm()=0
Disarm the timer.
void disarm()
Disarm the timer.
virtual void arm(Tick ticks)=0
Arm the timer so that it fires after a certain number of ticks.
Tick ticksFromHostNs(uint64_t ns)
Convert nanoseconds executed on the host into Ticks executed in the simulator.
Tick ticksFromHostCycles(uint64_t cycles)
Convert cycles executed on the host into Ticks executed in the simulator.
void arm(Tick ticks) override
Arm the timer so that it fires after a certain number of ticks.
uint64_t hostNs(Tick ticks)
Convert a time in simulator ticks to host nanoseconds.
PerfKvmTimer(PerfKvmCounter &ctr, int signo, float hostFactor, Tick hostFreq)
Create a timer that uses an existing hardware cycle counter.
uint64_t Tick
Tick count type.
virtual Tick calcResolution()=0
Calculate the timer resolution, used by resolution() which caches the result.
struct itimerspec prevTimerSpec
void disarm() override
Disarm the timer.
Tick calcResolution()
Calculate the timer resolution, used by resolution() which caches the result.
int signo
Signal to deliver when the timer times out.
PosixKvmTimer(int signo, clockid_t clockID, float hostFactor, Tick hostFreq)
Tick calcResolution() override
Calculate the timer resolution, used by resolution() which caches the result.
BaseKvmTimer(int signo, float hostFactor, Tick hostFreq)
Setup basic timer functionality shared by all timer implementations.
Timer functions to interrupt VM execution after a number of simulation ticks.
Tick resolution()
Determine the resolution of the timer in ticks.
PerfKvmCounter & hwOverflow
Timer based on standard POSIX timers.
Tick _resolution
Cached resolution.
Tick hostFreq
Host frequency.
float hostFactor
Performance scaling factor.
uint64_t hostCycles(Tick ticks)
Convert a time in simulator ticks to host cycles.
PerfEvent based timer using the host's CPU cycle counter.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17