From 4f0e3cd4d70a2f852c9ca50fcfdc2684787c8771 Mon Sep 17 00:00:00 2001 From: Mitch Hayenga Date: Sat, 20 Sep 2014 17:17:45 -0400 Subject: [PATCH] cpu: Add ExecFlags debug flag Adds a debug flag to print out the flags a instruction is tagged with. --- src/cpu/SConscript | 3 ++- src/cpu/exetrace.cc | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 << ")"; + } } // -- 2.30.2