summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-11-02 14:45:35 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-11-02 14:45:35 -0500
commit0b3c27f14975718c00367e901fb548fda2bc7dd1 (patch)
tree4dad6e5986a89fce74eeef922e72a7be221c04bc
parent15ccd16fd8fab2d66224f840307be797ac3094bd (diff)
downloadgem5-0b3c27f14975718c00367e901fb548fda2bc7dd1.tar.xz
Fix bug where simulation terminates same cycle as last stat dump causing a duplicate row in db
--HG-- extra : convert_revision : 45877c6feeaddf921eb0f4764246bf66e1705a1d
-rw-r--r--sim/stat_control.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sim/stat_control.cc b/sim/stat_control.cc
index 2f6e56b44..85c405b7f 100644
--- a/sim/stat_control.cc
+++ b/sim/stat_control.cc
@@ -61,6 +61,7 @@ namespace Stats {
Time statTime(true);
Tick startTick;
+Tick lastDump(0);
class SimTicksReset : public Callback
{
@@ -194,6 +195,11 @@ list<Output *> OutputList;
void
DumpNow()
{
+ assert(lastDump <= curTick);
+ if (lastDump == curTick)
+ return;
+ lastDump = curTick;
+
list<Output *>::iterator i = OutputList.begin();
list<Output *>::iterator end = OutputList.end();
for (; i != end; ++i) {