From: Ali Saidi Date: Wed, 2 Nov 2005 19:45:35 +0000 (-0500) Subject: Fix bug where simulation terminates same cycle as last stat dump causing a duplicate... X-Git-Tag: m5_2.0_beta1~323 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b3c27f14975718c00367e901fb548fda2bc7dd1;p=gem5.git Fix bug where simulation terminates same cycle as last stat dump causing a duplicate row in db --HG-- extra : convert_revision : 45877c6feeaddf921eb0f4764246bf66e1705a1d --- 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 OutputList; void DumpNow() { + assert(lastDump <= curTick); + if (lastDump == curTick) + return; + lastDump = curTick; + list::iterator i = OutputList.begin(); list::iterator end = OutputList.end(); for (; i != end; ++i) {