/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2003-2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "sim/param.hh"
#include "sim/serialize.hh"
#include "sim/sim_exit.hh"
-#include "sim/sim_stats.hh"
+#include "sim/stat_control.hh"
+#include "sim/stats.hh"
using namespace std;
-using namespace Statistics;
+using namespace Stats;
namespace AlphaPseudo
{
bool doStatisticsInsts;
bool doCheckpointInsts;
+ bool doQuiesce;
+
+ void
+ arm(ExecContext *xc)
+ {
+ xc->kernelStats.arm();
+ }
+
+ void
+ quiesce(ExecContext *xc)
+ {
+ if (!doQuiesce)
+ return;
+
+ xc->suspend();
+ xc->kernelStats.quiesce();
+ }
+
+ void
+ ivlb(ExecContext *xc)
+ {
+ xc->kernelStats.ivlb();
+ }
+
+ void
+ ivle(ExecContext *xc)
+ {
+ }
void
m5exit_old(ExecContext *xc)
Tick when = curTick + NS2Ticks(delay);
Tick repeat = NS2Ticks(period);
+ using namespace Stats;
SetupEvent(Reset, when, repeat);
}
Tick when = curTick + NS2Ticks(delay);
Tick repeat = NS2Ticks(period);
+ using namespace Stats;
SetupEvent(Dump, when, repeat);
}
Tick when = curTick + NS2Ticks(delay);
Tick repeat = NS2Ticks(period);
+ using namespace Stats;
SetupEvent(Dump|Reset, when, repeat);
}
Tick when = curTick + NS2Ticks(delay);
Tick repeat = NS2Ticks(period);
- SetupCheckpoint(when, repeat);
+ Checkpoint::setup(when, repeat);
}
class Context : public ParamContext
Context context("PseudoInsts");
+ Param<bool> __quiesce(&context, "quiesce",
+ "enable quiesce instructions",
+ true);
Param<bool> __statistics(&context, "statistics",
- "enable the statistics pseudo instructions",
+ "enable statistics pseudo instructions",
true);
Param<bool> __checkpoint(&context, "checkpoint",
- "enable the checkpoint pseudo instructions",
+ "enable checkpoint pseudo instructions",
true);
void
Context::checkParams()
{
+ doQuiesce = __quiesce;
doStatisticsInsts = __statistics;
doCheckpointInsts = __checkpoint;
}