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/kern/linux | |
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/kern/linux')
-rw-r--r-- | src/kern/linux/events.hh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kern/linux/events.hh b/src/kern/linux/events.hh index b8aad9d79..d4c77bf68 100644 --- a/src/kern/linux/events.hh +++ b/src/kern/linux/events.hh @@ -51,8 +51,8 @@ namespace Linux { class DebugPrintkEvent : public SkipFuncEvent { public: - DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr) - : SkipFuncEvent(q, desc, addr) {} + DebugPrintkEvent(PCEventScope *s, const std::string &desc, Addr addr) + : SkipFuncEvent(s, desc, addr) {} virtual void process(ThreadContext *xc); }; @@ -70,9 +70,9 @@ class DmesgDumpEvent : public PCEvent std::string fname; public: - DmesgDumpEvent(PCEventQueue *q, const std::string &desc, Addr addr, + DmesgDumpEvent(PCEventScope *s, const std::string &desc, Addr addr, const std::string &_fname) - : PCEvent(q, desc, addr), fname(_fname) {} + : PCEvent(s, desc, addr), fname(_fname) {} virtual void process(ThreadContext *xc); }; @@ -90,9 +90,9 @@ class KernelPanicEvent : public PCEvent std::string fname; public: - KernelPanicEvent(PCEventQueue *q, const std::string &desc, Addr addr, + KernelPanicEvent(PCEventScope *s, const std::string &desc, Addr addr, const std::string &_fname) - : PCEvent(q, desc, addr), fname(_fname) {} + : PCEvent(s, desc, addr), fname(_fname) {} virtual void process(ThreadContext *xc); }; @@ -116,9 +116,9 @@ class UDelayEvent : public SkipFuncEvent uint64_t argMultToNs; public: - UDelayEvent(PCEventQueue *q, const std::string &desc, Addr addr, + UDelayEvent(PCEventScope *s, const std::string &desc, Addr addr, uint64_t mult, uint64_t div) - : SkipFuncEvent(q, desc, addr), argDivToNs(div), argMultToNs(mult) {} + : SkipFuncEvent(s, desc, addr), argDivToNs(div), argMultToNs(mult) {} virtual void process(ThreadContext *xc); }; |