diff options
author | Gabe Black <gabeblack@google.com> | 2019-10-09 17:47:19 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-10-25 22:42:31 +0000 |
commit | 7bd57d5a94acbdcb64b4927ea6a673cae18adcc0 (patch) | |
tree | 1171079d0af63c62336bc1036e089fff95888e6a /src/arch | |
parent | 69930afa9b63c25baab86ff5fbe632fc02ce5369 (diff) | |
download | gem5-7bd57d5a94acbdcb64b4927ea6a673cae18adcc0.tar.xz |
cpu: Create a PCEventScope class to abstract the scope of PCEvents.
This abstraction will allow scheduling PCEvents for a particular
ThreadContext, all contexts on a CPU, all contexts in a system, etc.,
and delegates scheduling and removing events to each particular scope.
Right now the PCEventQueue is the only implementor of the PCEventSCope
interface.
Change-Id: I8fb62931511136229915c2e19d36aae7ffdec9df
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22099
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/alpha/freebsd/system.hh | 4 | ||||
-rw-r--r-- | src/arch/alpha/idle_event.hh | 4 | ||||
-rw-r--r-- | src/arch/alpha/linux/system.hh | 8 | ||||
-rw-r--r-- | src/arch/arm/linux/system.hh | 8 | ||||
-rw-r--r-- | src/arch/mips/idle_event.hh | 4 | ||||
-rw-r--r-- | src/arch/mips/linux/system.hh | 8 | ||||
-rw-r--r-- | src/arch/riscv/idle_event.hh | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/src/arch/alpha/freebsd/system.hh b/src/arch/alpha/freebsd/system.hh index 48f6238c0..1a8bb9366 100644 --- a/src/arch/alpha/freebsd/system.hh +++ b/src/arch/alpha/freebsd/system.hh @@ -42,9 +42,9 @@ class FreebsdAlphaSystem : public AlphaSystem class SkipCalibrateClocksEvent : public SkipFuncEvent { public: - SkipCalibrateClocksEvent(PCEventQueue *q, const std::string &desc, + SkipCalibrateClocksEvent(PCEventScope *s, const std::string &desc, Addr addr) - : SkipFuncEvent(q, desc, addr) {} + : SkipFuncEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; diff --git a/src/arch/alpha/idle_event.hh b/src/arch/alpha/idle_event.hh index 97d5bdd6e..b3b53daea 100644 --- a/src/arch/alpha/idle_event.hh +++ b/src/arch/alpha/idle_event.hh @@ -38,8 +38,8 @@ class IdleStartEvent : public PCEvent { public: - IdleStartEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : PCEvent(q, desc, addr) + IdleStartEvent(PCEventScope *s, const std::string &desc, Addr addr) + : PCEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; diff --git a/src/arch/alpha/linux/system.hh b/src/arch/alpha/linux/system.hh index 8ea387e74..2477d426e 100644 --- a/src/arch/alpha/linux/system.hh +++ b/src/arch/alpha/linux/system.hh @@ -53,15 +53,15 @@ class LinuxAlphaSystem : public AlphaSystem private: struct SkipDelayLoopEvent : public SkipFuncEvent { - SkipDelayLoopEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : SkipFuncEvent(q, desc, addr) {} + SkipDelayLoopEvent(PCEventScope *s, const std::string &desc, Addr addr) + : SkipFuncEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; struct PrintThreadInfo : public PCEvent { - PrintThreadInfo(PCEventQueue *q, const std::string &desc, Addr addr) - : PCEvent(q, desc, addr) {} + PrintThreadInfo(PCEventScope *s, const std::string &desc, Addr addr) + : PCEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; diff --git a/src/arch/arm/linux/system.hh b/src/arch/arm/linux/system.hh index 247ebae13..098ceda2e 100644 --- a/src/arch/arm/linux/system.hh +++ b/src/arch/arm/linux/system.hh @@ -127,8 +127,8 @@ class LinuxArmSystem : public GenericArmSystem class DumpStatsPCEvent : public PCEvent { public: - DumpStatsPCEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : PCEvent(q, desc, addr) + DumpStatsPCEvent(PCEventScope *s, const std::string &desc, Addr addr) + : PCEvent(s, desc, addr) {} virtual void process(ThreadContext* tc); @@ -140,8 +140,8 @@ class DumpStatsPCEvent : public PCEvent class DumpStatsPCEvent64 : public DumpStatsPCEvent { public: - DumpStatsPCEvent64(PCEventQueue *q, const std::string &desc, Addr addr) - : DumpStatsPCEvent(q, desc, addr) + DumpStatsPCEvent64(PCEventScope *s, const std::string &desc, Addr addr) + : DumpStatsPCEvent(s, desc, addr) {} private: void getTaskDetails(ThreadContext *tc, uint32_t &pid, uint32_t &tgid, diff --git a/src/arch/mips/idle_event.hh b/src/arch/mips/idle_event.hh index 3f96ce3e0..c65be0d0c 100644 --- a/src/arch/mips/idle_event.hh +++ b/src/arch/mips/idle_event.hh @@ -38,8 +38,8 @@ class IdleStartEvent : public PCEvent { public: - IdleStartEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : PCEvent(q, desc, addr) + IdleStartEvent(PCEventScope *s, const std::string &desc, Addr addr) + : PCEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; diff --git a/src/arch/mips/linux/system.hh b/src/arch/mips/linux/system.hh index 55e47bbb2..2b8526b63 100644 --- a/src/arch/mips/linux/system.hh +++ b/src/arch/mips/linux/system.hh @@ -54,16 +54,16 @@ class LinuxMipsSystem : public MipsSystem class SkipDelayLoopEvent : public SkipFuncEvent { public: - SkipDelayLoopEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : SkipFuncEvent(q, desc, addr) {} + SkipDelayLoopEvent(PCEventScope *s, const std::string &desc, Addr addr) + : SkipFuncEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; class PrintThreadInfo : public PCEvent { public: - PrintThreadInfo(PCEventQueue *q, const std::string &desc, Addr addr) - : PCEvent(q, desc, addr) {} + PrintThreadInfo(PCEventScope *s, const std::string &desc, Addr addr) + : PCEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; diff --git a/src/arch/riscv/idle_event.hh b/src/arch/riscv/idle_event.hh index e77ae59f5..bcba05bf1 100644 --- a/src/arch/riscv/idle_event.hh +++ b/src/arch/riscv/idle_event.hh @@ -38,8 +38,8 @@ class IdleStartEvent : public PCEvent { public: - IdleStartEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : PCEvent(q, desc, addr) + IdleStartEvent(PCEventScope *s, const std::string &desc, Addr addr) + : PCEvent(s, desc, addr) {} virtual void process(ThreadContext *tc); }; |