summaryrefslogtreecommitdiff
path: root/src/cpu/exetrace.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-04-15 10:44:32 -0700
committerNathan Binkert <nate@binkert.org>2011-04-15 10:44:32 -0700
commiteddac53ff60c579eff28134bde84783fe36d6214 (patch)
tree9095c6b64a6fdabf4e0d00b2c8f2ca40ad495f49 /src/cpu/exetrace.cc
parentf946d7bcdb4d0b4327857d319dd4ecdd1c320d62 (diff)
downloadgem5-eddac53ff60c579eff28134bde84783fe36d6214.tar.xz
trace: reimplement the DTRACE function so it doesn't use a vector
At the same time, rename the trace flags to debug flags since they have broader usage than simply tracing. This means that --trace-flags is now --debug-flags and --trace-help is now --debug-help
Diffstat (limited to 'src/cpu/exetrace.cc')
-rw-r--r--src/cpu/exetrace.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc
index ea90ba7c2..a6450ffe3 100644
--- a/src/cpu/exetrace.cc
+++ b/src/cpu/exetrace.cc
@@ -41,6 +41,7 @@
#include "cpu/exetrace.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
+#include "debug/ExecAll.hh"
#include "enums/OpClass.hh"
using namespace std;
@@ -59,22 +60,21 @@ Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran)
{
ostream &outs = Trace::output();
- if (IsOn(ExecTicks))
+ if (Debug::ExecTicks)
dumpTicks(outs);
outs << thread->getCpuPtr()->name() << " ";
- if (IsOn(ExecSpeculative))
+ if (Debug::ExecSpeculative)
outs << (misspeculating ? "-" : "+") << " ";
- if (IsOn(ExecThread))
+ if (Debug::ExecThread)
outs << "T" << thread->threadId() << " : ";
std::string sym_str;
Addr sym_addr;
Addr cur_pc = pc.instAddr();
- if (debugSymbolTable
- && IsOn(ExecSymbol)
+ if (debugSymbolTable && Debug::ExecSymbol
#if FULL_SYSTEM
&& !inUserMode(thread)
#endif
@@ -104,25 +104,25 @@ Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran)
if (ran) {
outs << " : ";
- if (IsOn(ExecOpClass)) {
+ if (Debug::ExecOpClass) {
outs << Enums::OpClassStrings[inst->opClass()] << " : ";
}
- if (IsOn(ExecResult) && predicate == false) {
+ if (Debug::ExecResult && predicate == false) {
outs << "Predicated False";
}
- if (IsOn(ExecResult) && data_status != DataInvalid) {
+ if (Debug::ExecResult && data_status != DataInvalid) {
ccprintf(outs, " D=%#018x", data.as_int);
}
- if (IsOn(ExecEffAddr) && addr_valid)
+ if (Debug::ExecEffAddr && addr_valid)
outs << " A=0x" << hex << addr;
- if (IsOn(ExecFetchSeq) && fetch_seq_valid)
+ if (Debug::ExecFetchSeq && fetch_seq_valid)
outs << " FetchSeq=" << dec << fetch_seq;
- if (IsOn(ExecCPSeq) && cp_seq_valid)
+ if (Debug::ExecCPSeq && cp_seq_valid)
outs << " CPSeq=" << dec << cp_seq;
}
@@ -143,14 +143,14 @@ Trace::ExeTracerRecord::dump()
* finishes. Macroops then behave like regular instructions and don't
* complete/print when they fault.
*/
- if (IsOn(ExecMacro) && staticInst->isMicroop() &&
- ((IsOn(ExecMicro) &&
- macroStaticInst && staticInst->isFirstMicroop()) ||
- (!IsOn(ExecMicro) &&
+ if (Debug::ExecMacro && staticInst->isMicroop() &&
+ ((Debug::ExecMicro &&
+ macroStaticInst && staticInst->isFirstMicroop()) ||
+ (!Debug::ExecMicro &&
macroStaticInst && staticInst->isLastMicroop()))) {
traceInst(macroStaticInst, false);
}
- if (IsOn(ExecMicro) || !staticInst->isMicroop()) {
+ if (Debug::ExecMicro || !staticInst->isMicroop()) {
traceInst(staticInst, true);
}
}