projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made sure the constructor for insts use ExtMachInst rather than MachInst, since other...
[gem5.git]
/
src
/
sim
/
stat_control.cc
diff --git
a/src/sim/stat_control.cc
b/src/sim/stat_control.cc
index f7fc03d7409b6b9f4d142dd066ce5e6b235c9a72..3fad8beb511a7d3d8799f25f5c4e47ebe64367b5 100644
(file)
--- a/
src/sim/stat_control.cc
+++ b/
src/sim/stat_control.cc
@@
-160,13
+160,13
@@
class StatEvent : public Event
Tick repeat;
public:
Tick repeat;
public:
- StatEvent(int _flags, Tick _when, Tick _repeat);
+ StatEvent(
EventQueue *queue,
int _flags, Tick _when, Tick _repeat);
virtual void process();
virtual const char *description();
};
virtual void process();
virtual const char *description();
};
-StatEvent::StatEvent(int _flags, Tick _when, Tick _repeat)
- : Event(
&mainEventQ
ueue, Stat_Event_Pri),
+StatEvent::StatEvent(
EventQueue *queue,
int _flags, Tick _when, Tick _repeat)
+ : Event(
q
ueue, Stat_Event_Pri),
flags(_flags), repeat(_repeat)
{
setFlags(AutoDelete);
flags(_flags), repeat(_repeat)
{
setFlags(AutoDelete);
@@
-185,8
+185,10
@@
StatEvent::process()
if (flags & Stats::Dump)
DumpNow();
if (flags & Stats::Dump)
DumpNow();
- if (flags & Stats::Reset)
+ if (flags & Stats::Reset) {
+ cprintf("Resetting stats at cycle %d!\n", curTick);
reset();
reset();
+ }
if (repeat)
schedule(curTick + repeat);
if (repeat)
schedule(curTick + repeat);
@@
-214,15
+216,17
@@
DumpNow()
}
void
}
void
-SetupEvent(int flags, Tick when, Tick repeat)
+SetupEvent(int flags, Tick when, Tick repeat
, EventQueue *queue
)
{
{
- new StatEvent(flags, when, repeat);
+ if (queue == NULL)
+ queue = &mainEventQueue;
+
+ new StatEvent(queue, flags, when, repeat);
}
/* namespace Stats */ }
}
/* namespace Stats */ }
-extern "C" void
-debugDumpStats()
+void debugDumpStats()
{
Stats::DumpNow();
}
{
Stats::DumpNow();
}