X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fcpu%2Fexetrace.hh;h=ebb712af6a567fecd2f5c9ef01ee3bf4131dadec;hb=072f78471d11c31b6009beb572296f704912d0f7;hp=76907d955a6f712e5e707666f29cd11047a53f8d;hpb=08474ccf68e14f59b4517c6024a9bc6ecbd4a1d5;p=gem5.git diff --git a/src/cpu/exetrace.hh b/src/cpu/exetrace.hh index 76907d955..ebb712af6 100644 --- a/src/cpu/exetrace.hh +++ b/src/cpu/exetrace.hh @@ -29,56 +29,65 @@ * Nathan Binkert */ -#ifndef __EXETRACE_HH__ -#define __EXETRACE_HH__ +#ifndef __CPU_EXETRACE_HH__ +#define __CPU_EXETRACE_HH__ #include "base/trace.hh" +#include "base/types.hh" #include "cpu/static_inst.hh" -#include "sim/host.hh" +#include "cpu/thread_context.hh" +#include "debug/ExecEnable.hh" +#include "debug/ExecSpeculative.hh" +#include "params/ExeTracer.hh" #include "sim/insttracer.hh" class ThreadContext; - namespace Trace { class ExeTracerRecord : public InstRecord { public: ExeTracerRecord(Tick _when, ThreadContext *_thread, - const StaticInstPtr &_staticInst, Addr _pc, bool spec) - : InstRecord(_when, _thread, _staticInst, _pc, spec) + const StaticInstPtr _staticInst, TheISA::PCState _pc, + bool spec, const StaticInstPtr _macroStaticInst = NULL) + : InstRecord(_when, _thread, _staticInst, _pc, spec, + _macroStaticInst) { } + void traceInst(const StaticInstPtr &inst, bool ran); + void dump(); + virtual void dumpTicks(std::ostream &outs); }; class ExeTracer : public InstTracer { public: - - ExeTracer(const std::string & name) : InstTracer(name) + typedef ExeTracerParams Params; + ExeTracer(const Params *params) : InstTracer(params) {} InstRecord * getInstRecord(Tick when, ThreadContext *tc, - const StaticInstPtr staticInst, Addr pc) + const StaticInstPtr staticInst, TheISA::PCState pc, + const StaticInstPtr macroStaticInst = NULL) { - if (!IsOn(ExecEnable)) + if (!Debug::ExecEnable) return NULL; if (!Trace::enabled) return NULL; - if (!IsOn(ExecSpeculative) && tc->misspeculating()) + if (!Debug::ExecSpeculative && tc->misspeculating()) return NULL; return new ExeTracerRecord(when, tc, - staticInst, pc, tc->misspeculating()); + staticInst, pc, tc->misspeculating(), macroStaticInst); } }; -/* namespace Trace */ } +} // namespace Trace -#endif // __EXETRACE_HH__ +#endif // __CPU_EXETRACE_HH__