nState.update(this);
mState.update(record->getThread());
+ bool errorFound = false;
// Regular int regs
for (int i = 0; i < STATE_NUMVALS; i++) {
if (nState.changed[i] || mState.changed[i]) {
vergence, regNames[i],
nState.newState[i],
mState.oldState[i], mState.newState[i]);
+ errorFound = true;
} else if (!mState.changed[i]) {
DPRINTF(ExecRegDelta, "%s [%5s] "\
"Native: %#010x => %#010x "\
vergence, regNames[i],
nState.oldState[i], nState.newState[i],
mState.newState[i]);
+ errorFound = true;
} else if (mState.oldState[i] != nState.oldState[i] ||
mState.newState[i] != nState.newState[i]) {
DPRINTF(ExecRegDelta, "%s [%5s] "\
vergence, regNames[i],
nState.oldState[i], nState.newState[i],
mState.oldState[i], mState.newState[i]);
+ errorFound = true;
}
}
}
+ if (errorFound) {
+ StaticInstPtr inst = record->getStaticInst();
+ assert(inst);
+ bool ran = true;
+ if (inst->isMicroop()) {
+ ran = false;
+ inst = record->getMacroStaticInst();
+ }
+ assert(inst);
+ record->traceInst(inst, ran);
+ }
}
} /* namespace Trace */
from m5.SimObject import SimObject
from m5.params import *
-from InstTracer import InstTracer
+from ExeTracer import ExeTracer
-class NativeTrace(InstTracer):
+class NativeTrace(ExeTracer):
abstract = True
type = 'NativeTrace'
cxx_class = 'Trace::NativeTrace'
namespace Trace {
NativeTrace::NativeTrace(const Params *p)
- : InstTracer(p)
+ : ExeTracer(p)
{
if (ListenSocket::allDisabled())
fatal("All listeners are disabled!");
#include "base/socket.hh"
#include "base/trace.hh"
#include "base/types.hh"
+#include "cpu/exetrace.hh"
#include "cpu/static_inst.hh"
-#include "sim/insttracer.hh"
class ThreadContext;
class NativeTrace;
-class NativeTraceRecord : public InstRecord
+class NativeTraceRecord : public ExeTracerRecord
{
protected:
NativeTrace * parent;
Tick _when, ThreadContext *_thread,
const StaticInstPtr _staticInst, Addr _pc, bool spec,
const StaticInstPtr _macroStaticInst = NULL, MicroPC _upc = 0)
- : InstRecord(_when, _thread, _staticInst, _pc, spec,
+ : ExeTracerRecord(_when, _thread, _staticInst, _pc, spec,
_macroStaticInst, _upc),
parent(_parent)
{
void dump();
};
-class NativeTrace : public InstTracer
+class NativeTrace : public ExeTracer
{
protected:
int fd;