summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2009-05-05 02:39:05 -0400
committerKorey Sewell <ksewell@umich.edu>2009-05-05 02:39:05 -0400
commit9f90291c54135acc42be0fcb8843ec4e67eab2fb (patch)
treeb9877bd1b3a7fb52108def816135943101109608 /src/cpu/base.hh
parent06b3e3c303599e4227212638fa4778d115842eea (diff)
downloadgem5-9f90291c54135acc42be0fcb8843ec4e67eab2fb.tar.xz
cpus: fix cpu progress event
this was double scheduling itself (once in constructor and once in cpu code). also add support for stopping / starting progress events through repeatEvent flag and also changing the interval of the progress event as well
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 8af3295eb..e63960cc1 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -61,15 +61,21 @@ namespace TheISA
class CPUProgressEvent : public Event
{
protected:
- Tick interval;
+ Tick _interval;
Counter lastNumInst;
BaseCPU *cpu;
+ bool _repeatEvent;
public:
- CPUProgressEvent(BaseCPU *_cpu, Tick ival);
+ CPUProgressEvent(BaseCPU *_cpu, Tick ival = 0);
void process();
+ void interval(Tick ival) { _interval = ival; }
+ Tick interval() { return _interval; }
+
+ void repeatEvent(bool repeat) { _repeatEvent = repeat; }
+
virtual const char *description() const;
};