From: Mitch Hayenga Date: Sat, 20 Sep 2014 21:17:45 +0000 (-0400) Subject: cpu: Add ExecFlags debug flag X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f0e3cd4d70a2f852c9ca50fcfdc2684787c8771;p=gem5.git cpu: Add ExecFlags debug flag Adds a debug flag to print out the flags a instruction is tagged with. --- diff --git a/src/cpu/SConscript b/src/cpu/SConscript index 5d9a48716..df29f6c73 100644 --- a/src/cpu/SConscript +++ b/src/cpu/SConscript @@ -96,6 +96,7 @@ DebugFlag('ExecMacro', 'Filter: Include macroops') DebugFlag('ExecUser', 'Filter: Trace user mode instructions') DebugFlag('ExecKernel', 'Filter: Trace kernel mode instructions') DebugFlag('ExecAsid', 'Format: Include ASID in trace') +DebugFlag('ExecFlags', 'Format: Include instruction flags in trace') DebugFlag('Fetch') DebugFlag('IntrControl') DebugFlag('O3PipeView') @@ -106,7 +107,7 @@ CompoundFlag('ExecAll', [ 'ExecEnable', 'ExecCPSeq', 'ExecEffAddr', 'ExecFaulting', 'ExecFetchSeq', 'ExecOpClass', 'ExecRegDelta', 'ExecResult', 'ExecSpeculative', 'ExecSymbol', 'ExecThread', 'ExecTicks', 'ExecMicro', 'ExecMacro', 'ExecUser', 'ExecKernel', - 'ExecAsid' ]) + 'ExecAsid', 'ExecFlags' ]) CompoundFlag('Exec', [ 'ExecEnable', 'ExecTicks', 'ExecOpClass', 'ExecThread', 'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro', 'ExecFaulting', 'ExecUser', 'ExecKernel' ]) diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc index b3b6e6a60..9709466b7 100644 --- a/src/cpu/exetrace.cc +++ b/src/cpu/exetrace.cc @@ -131,6 +131,12 @@ Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran) if (Debug::ExecCPSeq && cp_seq_valid) outs << " CPSeq=" << dec << cp_seq; + + if (Debug::ExecFlags) { + outs << " flags=("; + inst->printFlags(outs, "|"); + outs << ")"; + } } //