- class Context : public ParamContext
- {
- public:
- Context(const string §ion) : ParamContext(section) {}
- void checkParams();
- };
-
- Context context("pseudo_inst");
-
- Param<bool> __quiesce(&context, "quiesce",
- "enable quiesce instructions",
- true);
- Param<bool> __statistics(&context, "statistics",
- "enable statistics pseudo instructions",
- true);
- Param<bool> __checkpoint(&context, "checkpoint",
- "enable checkpoint pseudo instructions",
- true);
-
- void
- Context::checkParams()
- {
- doQuiesce = __quiesce;
- doStatisticsInsts = __statistics;
- doCheckpointInsts = __checkpoint;
- }
+ tc->getSystemPtr()->kernelSymtab->insert(addr,symbol);
+ debugSymbolTable->insert(addr,symbol);
+}
+
+#endif
+
+
+void
+resetstats(ThreadContext *tc, Tick delay, Tick period)
+{
+ if (!tc->getCpuPtr()->params()->do_statistics_insts)
+ return;
+
+
+ Tick when = curTick + delay * SimClock::Int::ns;
+ Tick repeat = period * SimClock::Int::ns;
+
+ Stats::StatEvent(false, true, when, repeat);
+}
+
+void
+dumpstats(ThreadContext *tc, Tick delay, Tick period)
+{
+ if (!tc->getCpuPtr()->params()->do_statistics_insts)
+ return;
+
+
+ Tick when = curTick + delay * SimClock::Int::ns;
+ Tick repeat = period * SimClock::Int::ns;
+
+ Stats::StatEvent(true, false, when, repeat);
+}
+
+void
+dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
+{
+ if (!tc->getCpuPtr()->params()->do_statistics_insts)
+ return;
+
+
+ Tick when = curTick + delay * SimClock::Int::ns;
+ Tick repeat = period * SimClock::Int::ns;
+
+ Stats::StatEvent(true, true, when, repeat);
+}
+
+void
+m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
+{
+ if (!tc->getCpuPtr()->params()->do_checkpoint_insts)
+ return;
+
+ Tick when = curTick + delay * SimClock::Int::ns;
+ Tick repeat = period * SimClock::Int::ns;
+
+ Event *event = new SimLoopExitEvent("checkpoint", 0, repeat);
+ mainEventQueue.schedule(event, when);
+}